pub trait RcSlice1Ext<T>: Sized {
// Required methods
unsafe fn from_rc_slice_unchecked(items: Rc<[T]>) -> Self;
fn try_from_rc_slice(items: Rc<[T]>) -> Result<Self, EmptyError<Rc<[T]>>>;
fn from_array1<const N: usize>(items: [T; N]) -> Self
where [T; N]: Array1;
fn from_boxed_slice1(items: BoxedSlice1<T>) -> Self;
fn from_cow_slice1(items: CowSlice1<'_, T>) -> Self
where T: Clone;
fn try_into_rc_array<const N: usize>(self) -> Result<Rc<[T; N]>, Self>;
fn into_rc_slice(self) -> Rc<[T]>;
fn as_slice1(&self) -> &Slice1<T>;
}Available on crate feature
alloc only.Required Methods§
Sourceunsafe fn from_rc_slice_unchecked(items: Rc<[T]>) -> Self
unsafe fn from_rc_slice_unchecked(items: Rc<[T]>) -> Self
§Safety
items must be non-empty. For example, it is unsound to call this function with
Rc::<T>::from([]).
fn try_from_rc_slice(items: Rc<[T]>) -> Result<Self, EmptyError<Rc<[T]>>>
fn from_array1<const N: usize>(items: [T; N]) -> Self
fn from_boxed_slice1(items: BoxedSlice1<T>) -> Self
fn from_cow_slice1(items: CowSlice1<'_, T>) -> Selfwhere
T: Clone,
fn try_into_rc_array<const N: usize>(self) -> Result<Rc<[T; N]>, Self>
fn into_rc_slice(self) -> Rc<[T]>
fn as_slice1(&self) -> &Slice1<T>
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.