pub struct CRDTMemoryPool { /* private fields */ }Expand description
Memory pool for CRDT objects
Implementations§
Source§impl CRDTMemoryPool
impl CRDTMemoryPool
Sourcepub fn with_config(config: PoolConfig) -> Self
pub fn with_config(config: PoolConfig) -> Self
Create a new memory pool with custom configuration
Sourcepub fn get_lww_register(&self) -> LwwRegister<String>
pub fn get_lww_register(&self) -> LwwRegister<String>
Get an LWW register from the pool
Sourcepub fn return_lww_register(&self, register: LwwRegister<String>)
pub fn return_lww_register(&self, register: LwwRegister<String>)
Return an LWW register to the pool
Sourcepub fn get_lww_map(&self) -> LwwMap<String, String>
pub fn get_lww_map(&self) -> LwwMap<String, String>
Get an LWW map from the pool
Sourcepub fn return_lww_map(&self, map: LwwMap<String, String>)
pub fn return_lww_map(&self, map: LwwMap<String, String>)
Return an LWW map to the pool
Sourcepub fn get_gcounter(&self) -> GCounter
pub fn get_gcounter(&self) -> GCounter
Get a GCounter from the pool
Sourcepub fn return_gcounter(&self, counter: GCounter)
pub fn return_gcounter(&self, counter: GCounter)
Return a GCounter to the pool
Sourcepub fn pool_sizes(&self) -> HashMap<String, usize>
pub fn pool_sizes(&self) -> HashMap<String, usize>
Get current pool sizes
Source§impl CRDTMemoryPool
Convenience methods for creating pooled CRDTs
impl CRDTMemoryPool
Convenience methods for creating pooled CRDTs
Sourcepub fn create_pooled_lww_register(&self) -> PooledCRDT<LwwRegister<String>>
pub fn create_pooled_lww_register(&self) -> PooledCRDT<LwwRegister<String>>
Create a pooled LWW register
Sourcepub fn create_pooled_lww_map(&self) -> PooledCRDT<LwwMap<String, String>>
pub fn create_pooled_lww_map(&self) -> PooledCRDT<LwwMap<String, String>>
Create a pooled LWW map
Sourcepub fn create_pooled_gcounter(&self) -> PooledCRDT<GCounter>
pub fn create_pooled_gcounter(&self) -> PooledCRDT<GCounter>
Create a pooled GCounter
Trait Implementations§
Source§impl Clone for CRDTMemoryPool
impl Clone for CRDTMemoryPool
Auto Trait Implementations§
impl Freeze for CRDTMemoryPool
impl !RefUnwindSafe for CRDTMemoryPool
impl Send for CRDTMemoryPool
impl Sync for CRDTMemoryPool
impl Unpin for CRDTMemoryPool
impl !UnwindSafe for CRDTMemoryPool
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