IntoBoxedSlice

Trait IntoBoxedSlice 

Source
pub trait IntoBoxedSlice: Sized + AsSlice {
    // Required method
    fn into_boxed_slice(self) -> Box<[Self::Elem]>;
}
Expand description

A trait for obtaining a boxed slice [Self::Elem]

Required Methods§

Source

fn into_boxed_slice(self) -> Box<[Self::Elem]>

Yields boxed slice from generic

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> IntoBoxedSlice for Box<[T]>

Source§

impl<T> IntoBoxedSlice for Vec<T>

Source§

fn into_boxed_slice(self) -> Box<[<Vec<T> as AsSlice>::Elem]>

Source§

impl<T, const N: usize> IntoBoxedSlice for [T; N]

Implementors§