pub struct MemoryStore<K> { /* private fields */ }Expand description
Memory implementation of the PartialOrderStore trait.
Trait Implementations§
Source§impl<K: Clone> Clone for MemoryStore<K>
impl<K: Clone> Clone for MemoryStore<K>
Source§fn clone(&self) -> MemoryStore<K>
fn clone(&self) -> MemoryStore<K>
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> Default for MemoryStore<K>
impl<K> Default for MemoryStore<K>
Source§impl<K> PartialOrderStore<K> for MemoryStore<K>
impl<K> PartialOrderStore<K> for MemoryStore<K>
Source§async fn mark_ready(&mut self, key: K) -> Result<bool, PartialOrderError>
async fn mark_ready(&mut self, key: K) -> Result<bool, PartialOrderError>
Add an item to the store which has all it’s dependencies met already. If this is the first
time the item has been added it should also be pushed to the end of a “ready” queue.
Source§async fn mark_pending(
&mut self,
key: K,
dependencies: Vec<K>,
) -> Result<bool, PartialOrderError>
async fn mark_pending( &mut self, key: K, dependencies: Vec<K>, ) -> Result<bool, PartialOrderError>
Add an item which does not have all it’s dependencies met yet.
Source§async fn get_next_pending(
&self,
key: K,
) -> Result<Option<HashSet<(K, Vec<K>)>>, PartialOrderError>
async fn get_next_pending( &self, key: K, ) -> Result<Option<HashSet<(K, Vec<K>)>>, PartialOrderError>
Get all pending items which directly depend on the given key.
Source§async fn take_next_ready(&mut self) -> Result<Option<K>, PartialOrderError>
async fn take_next_ready(&mut self) -> Result<Option<K>, PartialOrderError>
Take the next ready item from the ready queue.
Source§async fn remove_pending(&mut self, key: K) -> Result<bool, PartialOrderError>
async fn remove_pending(&mut self, key: K) -> Result<bool, PartialOrderError>
Remove all items from the pending queue which depend on the passed key.
Auto Trait Implementations§
impl<K> Freeze for MemoryStore<K>
impl<K> RefUnwindSafe for MemoryStore<K>where
K: RefUnwindSafe,
impl<K> Send for MemoryStore<K>where
K: Send,
impl<K> Sync for MemoryStore<K>where
K: Sync,
impl<K> Unpin for MemoryStore<K>where
K: Unpin,
impl<K> UnwindSafe for MemoryStore<K>where
K: 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