pub struct IndexStore<K, P>(/* private fields */);Expand description
Key is from type usize and the information are saved in a List (Store).
Methods from Deref<Target = IndexStoreExt<K, P>>§
Trait Implementations§
Source§impl<K: Clone, P: Clone> Clone for IndexStore<K, P>
impl<K: Clone, P: Clone> Clone for IndexStore<K, P>
Source§fn clone(&self) -> IndexStore<K, P>
fn clone(&self) -> IndexStore<K, P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K, P> Deref for IndexStore<K, P>
impl<K, P> Deref for IndexStore<K, P>
Source§impl<K, P> Lookup<IndexStore<K, P>, P> for IndexLookup<K, P>
impl<K, P> Lookup<IndexStore<K, P>, P> for IndexLookup<K, P>
Source§impl<'a, K, P> Positions for IndexStore<K, &'a P>where
P: KeyPositionAsSlice,
impl<'a, K, P> Positions for IndexStore<K, &'a P>where
P: KeyPositionAsSlice,
Source§impl<K, P> Retriever<K> for IndexStore<K, P>
impl<K, P> Retriever<K> for IndexStore<K, P>
type Pos = <P as KeyPositionAsSlice>::Pos
Source§fn pos_by_key(&self, key: K) -> &[Self::Pos]
fn pos_by_key(&self, key: K) -> &[Self::Pos]
Returns all known positions for a given
Key.
If the Key not exist, than is the slice empty.Source§fn pos_by_many_keys<'a, K>(
&'a self,
keys: K,
) -> impl Iterator<Item = &'a Self::Pos>where
K: IntoIterator<Item = Q>,
Self::Pos: 'a,
fn pos_by_many_keys<'a, K>(
&'a self,
keys: K,
) -> impl Iterator<Item = &'a Self::Pos>where
K: IntoIterator<Item = Q>,
Self::Pos: 'a,
Returns all known positions for a given iterator of
Keys. Read moreSource§impl<K, P> Store for IndexStore<K, P>
impl<K, P> Store for IndexStore<K, P>
type Key = K
type Pos = <P as KeyPosition>::Pos
Source§fn insert(&mut self, key: Self::Key, pos: Self::Pos)
fn insert(&mut self, key: Self::Key, pos: Self::Pos)
Insert an
Key with the associated Positions.Source§fn delete(&mut self, key: Self::Key, pos: &Self::Pos)
fn delete(&mut self, key: Self::Key, pos: &Self::Pos)
Delete means: if an
Key has more than one Position, then remove only the given Position:
If the Key not exist, then is deleteignored:Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
To reduce memory allocations can create an
Store with capacity.Source§impl<'a, K, P> ViewCreator<'a> for IndexStore<K, P>
impl<'a, K, P> ViewCreator<'a> for IndexStore<K, P>
type Key = K
type Retriever = IndexStore<K, &'a P>
Source§fn create_view<It>(&'a self, keys: It) -> View<Self::Retriever>where
It: IntoIterator<Item = Self::Key>,
fn create_view<It>(&'a self, keys: It) -> View<Self::Retriever>where
It: IntoIterator<Item = Self::Key>,
Create a
View by the given Keys.Auto Trait Implementations§
impl<K, P> Freeze for IndexStore<K, P>
impl<K, P> RefUnwindSafe for IndexStore<K, P>where
K: RefUnwindSafe,
P: RefUnwindSafe,
impl<K, P> Send for IndexStore<K, P>
impl<K, P> Sync for IndexStore<K, P>
impl<K, P> Unpin for IndexStore<K, P>
impl<K, P> UnwindSafe for IndexStore<K, P>where
K: UnwindSafe,
P: 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