Skip to main content

SimdToArray

Trait SimdToArray 

Source
pub trait SimdToArray<T>:
    Clone
    + Debug
    + Index<usize, Output = T>
    + IndexMut<usize, Output = T>
    + AsRef<[T]>
    + AsMut<[T]>
    + Borrow<[T]>
    + BorrowMut<[T]>
    + IntoIterator<Item = T>
    + Sized {
    const LEN: usize;
Show 46 methods // Required methods fn from_fn(f: impl FnMut(usize) -> T) -> Self; fn as_slice(&self) -> &[T]; fn as_mut_slice(&mut self) -> &mut [T]; // Provided methods fn zeroed() -> Self where T: Default { ... } fn get(&self, i: usize) -> Option<&T> { ... } fn get_mut(&mut self, i: usize) -> Option<&mut T> { ... } fn first(&self) -> Option<&T> { ... } fn first_mut(&mut self) -> Option<&mut T> { ... } fn last(&self) -> Option<&T> { ... } fn last_mut(&mut self) -> Option<&mut T> { ... } fn len(&self) -> usize { ... } fn is_empty(&self) -> bool { ... } fn iter(&self) -> Iter<'_, T> ⓘ { ... } fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ { ... } fn windows(&self, size: usize) -> Windows<'_, T> ⓘ { ... } fn chunks(&self, size: usize) -> Chunks<'_, T> ⓘ { ... } fn chunks_exact(&self, size: usize) -> ChunksExact<'_, T> ⓘ { ... } fn rchunks(&self, size: usize) -> RChunks<'_, T> ⓘ { ... } fn rchunks_exact(&self, size: usize) -> RChunksExact<'_, T> ⓘ { ... } fn contains(&self, x: &T) -> bool where T: PartialEq { ... } fn starts_with(&self, needle: &[T]) -> bool where T: PartialEq { ... } fn ends_with(&self, needle: &[T]) -> bool where T: PartialEq { ... } fn binary_search(&self, x: &T) -> Result<usize, usize> where T: Ord { ... } fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize> where F: FnMut(&'a T) -> Ordering, T: 'a { ... } fn binary_search_by_key<'a, B: Ord, F: FnMut(&'a T) -> B>( &'a self, b: &B, f: F, ) -> Result<usize, usize> where T: 'a { ... } fn position(&self, f: impl FnMut(&T) -> bool) -> Option<usize> { ... } fn fill(&mut self, value: T) where T: Clone { ... } fn fill_with(&mut self, f: impl FnMut() -> T) { ... } fn swap(&mut self, a: usize, b: usize) { ... } fn reverse(&mut self) { ... } fn rotate_left(&mut self, mid: usize) { ... } fn rotate_right(&mut self, mid: usize) { ... } fn copy_from_slice(&mut self, src: &[T]) where T: Copy { ... } fn clone_from_slice(&mut self, src: &[T]) where T: Clone { ... } fn swap_with_slice(&mut self, other: &mut [T]) { ... } fn sort(&mut self) where T: Ord { ... } fn sort_by(&mut self, f: impl FnMut(&T, &T) -> Ordering) { ... } fn sort_by_key<K: Ord>(&mut self, f: impl FnMut(&T) -> K) { ... } fn sort_unstable(&mut self) where T: Ord { ... } fn sort_unstable_by(&mut self, f: impl FnMut(&T, &T) -> Ordering) { ... } fn sort_unstable_by_key<K: Ord>(&mut self, f: impl FnMut(&T) -> K) { ... } fn is_sorted(&self) -> bool where T: PartialOrd { ... } fn is_sorted_by(&self, f: impl FnMut(&T, &T) -> bool) -> bool { ... } fn is_sorted_by_key<K: PartialOrd>(&self, f: impl FnMut(&T) -> K) -> bool { ... } fn as_ptr(&self) -> *const T { ... } fn as_mut_ptr(&mut self) -> *mut T { ... }
}

Required Associated Constants§

Required Methods§

Source

fn from_fn(f: impl FnMut(usize) -> T) -> Self

Source

fn as_slice(&self) -> &[T]

Source

fn as_mut_slice(&mut self) -> &mut [T]

Provided Methods§

Source

fn zeroed() -> Self
where T: Default,

Source

fn get(&self, i: usize) -> Option<&T>

Source

fn get_mut(&mut self, i: usize) -> Option<&mut T>

Source

fn first(&self) -> Option<&T>

Source

fn first_mut(&mut self) -> Option<&mut T>

Source

fn last(&self) -> Option<&T>

Source

fn last_mut(&mut self) -> Option<&mut T>

Source

fn len(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

fn iter(&self) -> Iter<'_, T> ⓘ

Source

fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ

Source

fn windows(&self, size: usize) -> Windows<'_, T> ⓘ

Source

fn chunks(&self, size: usize) -> Chunks<'_, T> ⓘ

Source

fn chunks_exact(&self, size: usize) -> ChunksExact<'_, T> ⓘ

Source

fn rchunks(&self, size: usize) -> RChunks<'_, T> ⓘ

Source

fn rchunks_exact(&self, size: usize) -> RChunksExact<'_, T> ⓘ

Source

fn contains(&self, x: &T) -> bool
where T: PartialEq,

Source

fn starts_with(&self, needle: &[T]) -> bool
where T: PartialEq,

Source

fn ends_with(&self, needle: &[T]) -> bool
where T: PartialEq,

Source

fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where F: FnMut(&'a T) -> Ordering, T: 'a,

Source

fn binary_search_by_key<'a, B: Ord, F: FnMut(&'a T) -> B>( &'a self, b: &B, f: F, ) -> Result<usize, usize>
where T: 'a,

Source

fn position(&self, f: impl FnMut(&T) -> bool) -> Option<usize>

Source

fn fill(&mut self, value: T)
where T: Clone,

Source

fn fill_with(&mut self, f: impl FnMut() -> T)

Source

fn swap(&mut self, a: usize, b: usize)

Source

fn reverse(&mut self)

Source

fn rotate_left(&mut self, mid: usize)

Source

fn rotate_right(&mut self, mid: usize)

Source

fn copy_from_slice(&mut self, src: &[T])
where T: Copy,

Source

fn clone_from_slice(&mut self, src: &[T])
where T: Clone,

Source

fn swap_with_slice(&mut self, other: &mut [T])

Source

fn sort(&mut self)
where T: Ord,

Source

fn sort_by(&mut self, f: impl FnMut(&T, &T) -> Ordering)

Source

fn sort_by_key<K: Ord>(&mut self, f: impl FnMut(&T) -> K)

Source

fn sort_unstable(&mut self)
where T: Ord,

Source

fn sort_unstable_by(&mut self, f: impl FnMut(&T, &T) -> Ordering)

Source

fn sort_unstable_by_key<K: Ord>(&mut self, f: impl FnMut(&T) -> K)

Source

fn is_sorted(&self) -> bool
where T: PartialOrd,

Source

fn is_sorted_by(&self, f: impl FnMut(&T, &T) -> bool) -> bool

Source

fn is_sorted_by_key<K: PartialOrd>(&self, f: impl FnMut(&T) -> K) -> bool

Source

fn as_ptr(&self) -> *const T

Source

fn as_mut_ptr(&mut self) -> *mut T

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<const N: usize, T> SimdToArray<T> for [T; N]
where T: Clone + Debug,

Source§

const LEN: usize = N

Source§

fn from_fn(f: impl FnMut(usize) -> T) -> Self

Source§

fn as_slice(&self) -> &[T]

Source§

fn as_mut_slice(&mut self) -> &mut [T]

Implementors§