pub trait SliceExt: SliceExtSealed {
type Inner;
// Required methods
fn is_sorted_by<F: FnMut(&Self::Inner, &Self::Inner) -> Ordering>(
&self,
f: F,
) -> bool;
fn try_split_at(&self, k: usize) -> Option<(&Self, &Self)>;
fn try_split_at_mut(&mut self, k: usize) -> Option<(&mut Self, &mut Self)>;
unsafe fn split_at_unchecked(&self, k: usize) -> (&Self, &Self);
unsafe fn split_at_unchecked_mut(
&mut self,
k: usize,
) -> (&mut Self, &mut Self);
unsafe fn copy_from_ptr(&mut self, _: *const Self::Inner);
fn copy_x(&mut self, s: usize, t: usize, n: usize)
where Self::Inner: Copy;
fn copy_from_x(&mut self, other: &Self)
where Self::Inner: Copy;
// Provided methods
fn is_sorted(&self) -> bool
where Self::Inner: Ord { ... }
fn is_sorted_by_key<F: FnMut(&Self::Inner) -> K, K: Ord>(
&self,
f: F,
) -> bool { ... }
}
Required Associated Types§
Required Methods§
fn is_sorted_by<F: FnMut(&Self::Inner, &Self::Inner) -> Ordering>( &self, f: F, ) -> bool
fn try_split_at(&self, k: usize) -> Option<(&Self, &Self)>
fn try_split_at_mut(&mut self, k: usize) -> Option<(&mut Self, &mut Self)>
unsafe fn split_at_unchecked(&self, k: usize) -> (&Self, &Self)
unsafe fn split_at_unchecked_mut(&mut self, k: usize) -> (&mut Self, &mut Self)
unsafe fn copy_from_ptr(&mut self, _: *const Self::Inner)
fn copy_x(&mut self, s: usize, t: usize, n: usize)
fn copy_from_x(&mut self, other: &Self)
Provided Methods§
fn is_sorted(&self) -> bool
fn is_sorted_by_key<F: FnMut(&Self::Inner) -> K, K: Ord>(&self, f: F) -> bool
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.