Struct oxidd_cache::direct::DMApplyCache
source · pub struct DMApplyCache<M: Manager, O, H, const ARITY: usize = 2>(/* private fields */);Expand description
Fixed-size direct mapped apply cache
Implementations§
source§impl<M, O, H, const ARITY: usize> DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> DMApplyCache<M, O, H, ARITY>
sourcepub unsafe fn with_capacity(capacity: usize) -> Self
pub unsafe fn with_capacity(capacity: usize) -> Self
Create a new ApplyCache with the given capacity (entries).
§Safety
The apply cache must only be used inside a manager that guarantees all
node deletions to be wrapped inside an ApplyCache::pre_gc() /
ApplyCache::post_gc() pair.
Trait Implementations§
source§impl<M, O, H, const ARITY: usize> ApplyCache<M, O> for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> ApplyCache<M, O> for DMApplyCache<M, O, H, ARITY>
source§fn get(
&self,
manager: &M,
operator: O,
operands: &[Borrowed<'_, M::Edge>]
) -> Option<M::Edge>
fn get( &self, manager: &M, operator: O, operands: &[Borrowed<'_, M::Edge>] ) -> Option<M::Edge>
Get the result of
operation, if cachedsource§impl<M, O, H, const ARITY: usize> Debug for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Debug for DMApplyCache<M, O, H, ARITY>
source§impl<M: Manager, O, H, const ARITY: usize> DropWith<<M as Manager>::Edge> for DMApplyCache<M, O, H, ARITY>
impl<M: Manager, O, H, const ARITY: usize> DropWith<<M as Manager>::Edge> for DMApplyCache<M, O, H, ARITY>
source§impl<M, O, H, const ARITY: usize> StatisticsGenerator for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> StatisticsGenerator for DMApplyCache<M, O, H, ARITY>
source§fn print_stats(&self)
fn print_stats(&self)
Print statistics to stdout
Auto Trait Implementations§
impl<M, O, H, const ARITY: usize> Freeze for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize = 2> !RefUnwindSafe for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Send for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Sync for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Unpin for DMApplyCache<M, O, H, ARITY>where
H: Unpin,
impl<M, O, H, const ARITY: usize> UnwindSafe for DMApplyCache<M, O, H, ARITY>
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