pub struct IntIndex<K = i32, X = usize> { /* private fields */ }Expand description
Key is from type Into: i32.
Trait Implementations§
Source§impl<K, X> Filterable for IntIndex<K, X>
impl<K, X> Filterable for IntIndex<K, X>
type Key = K
type Index = X
Source§fn get(&self, key: &Self::Key) -> &[X]
fn get(&self, key: &Self::Key) -> &[X]
Get all indices for a given
Key.
If the Key not exist, than this method returns empty array.Source§fn get_with_check<F>(&self, key: &Self::Key, check: F) -> &[Self::Index]
fn get_with_check<F>(&self, key: &Self::Key, check: F) -> &[Self::Index]
Get all indices for a given
Key, if the check functions returns true.
If the Key not exist, than this method returns empty array.Source§impl<K, X> Store for IntIndex<K, X>
impl<K, X> Store for IntIndex<K, X>
Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
To reduce memory allocations can create an
Index-store with capacity.Source§fn from_list<I>(it: I) -> Selfwhere
I: IntoIterator<Item = Self::Key>,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Self: Store<Index = usize> + Sized,
fn from_list<I>(it: I) -> Selfwhere
I: IntoIterator<Item = Self::Key>,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Self: Store<Index = usize> + Sized,
Create a new
Store from a given List (array, slice, Vec, …) with a given Key.
The Index-Type is usize.Auto Trait Implementations§
impl<K, X> Freeze for IntIndex<K, X>where
K: Freeze,
impl<K, X> RefUnwindSafe for IntIndex<K, X>where
K: RefUnwindSafe,
X: RefUnwindSafe,
impl<K, X> Send for IntIndex<K, X>
impl<K, X> Sync for IntIndex<K, X>
impl<K, X> Unpin for IntIndex<K, X>
impl<K, X> UnwindSafe for IntIndex<K, X>where
K: UnwindSafe,
X: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more