What is the use of into_boxed_slice() methods?
问题 Looking at the methods available for Vec<T> I stumbled across into_boxed_slice(self) -> Box<[T]> String also has such a method ( into_boxed_str(self) ). The usefulness of having Deref for Vec<T> / String that allows them to be treated like a shared slice ( &[T] ) is obvious, but I don't see any use for an owned slice ( Box<[T]> ) except, perhaps, FFI. The Rust GitHub repo only uses into_boxed_slice() in a handful of cases. Since methods for creating boxed slices are available in std and this