pub struct CoherencyManager { /* private fields */ }Expand description
Coherency manager for multiple engrams
Manages a collection of coherent engrams with batched sync operations.
Implementations§
Source§impl CoherencyManager
impl CoherencyManager
Sourcepub fn register(&mut self, engram: CoherentEngram) -> u64
pub fn register(&mut self, engram: CoherentEngram) -> u64
Register a new engram
Sourcepub fn get(&self, id: u64) -> Option<&CoherentEngram>
pub fn get(&self, id: u64) -> Option<&CoherentEngram>
Get an engram by ID
Sourcepub fn get_mut(&mut self, id: u64) -> Option<&mut CoherentEngram>
pub fn get_mut(&mut self, id: u64) -> Option<&mut CoherentEngram>
Get mutable engram by ID
Sourcepub fn remove(&mut self, id: u64) -> Option<CoherentEngram>
pub fn remove(&mut self, id: u64) -> Option<CoherentEngram>
Remove an engram
Sourcepub fn stats(&self) -> CoherencyStats
pub fn stats(&self) -> CoherencyStats
Get statistics
Trait Implementations§
Source§impl Default for CoherencyManager
impl Default for CoherencyManager
Source§fn default() -> CoherencyManager
fn default() -> CoherencyManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CoherencyManager
impl RefUnwindSafe for CoherencyManager
impl Send for CoherencyManager
impl Sync for CoherencyManager
impl Unpin for CoherencyManager
impl UnwindSafe for CoherencyManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more