pub trait SimdToArray<T>:
Sized
+ Clone
+ Debug
+ Index<usize, Output = T, Output = T>
+ IndexMut<usize>
+ AsRef<[T]>
+ AsMut<[T]>
+ Borrow<[T]>
+ BorrowMut<[T]>
+ IntoIterator<Item = T> {
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, F>(
&'a self,
b: &B,
f: F,
) -> Result<usize, usize>
where B: Ord,
F: FnMut(&'a T) -> B,
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>(&mut self, f: impl FnMut(&T) -> K)
where K: Ord { ... }
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>(&mut self, f: impl FnMut(&T) -> K)
where K: Ord { ... }
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>(&self, f: impl FnMut(&T) -> K) -> bool
where K: PartialOrd { ... }
fn as_ptr(&self) -> *const T { ... }
fn as_mut_ptr(&mut self) -> *mut T { ... }
}Required Associated Constants§
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() -> Selfwhere
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) -> boolwhere
T: PartialEq,
fn starts_with(&self, needle: &[T]) -> boolwhere
T: PartialEq,
fn ends_with(&self, needle: &[T]) -> boolwhere
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>
fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
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>(&mut self, f: impl FnMut(&T) -> K)where
K: Ord,
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>(&mut self, f: impl FnMut(&T) -> K)where
K: Ord,
fn is_sorted(&self) -> boolwhere
T: PartialOrd,
fn is_sorted_by(&self, f: impl FnMut(&T, &T) -> bool) -> bool
fn is_sorted_by_key<K>(&self, f: impl FnMut(&T) -> K) -> boolwhere
K: PartialOrd,
fn as_ptr(&self) -> *const T
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".