pub struct CrdtBuilder { /* private fields */ }Expand description
CRDT Builder for creating custom CRDT types
Implementations§
Source§impl CrdtBuilder
impl CrdtBuilder
Sourcepub fn add_field(self, name: String, strategy: CrdtStrategy) -> Self
pub fn add_field(self, name: String, strategy: CrdtStrategy) -> Self
Add a field to the CRDT
Sourcepub fn add_optional_field(
self,
name: String,
strategy: CrdtStrategy,
default: Value,
) -> Self
pub fn add_optional_field( self, name: String, strategy: CrdtStrategy, default: Value, ) -> Self
Add an optional field with default value
Sourcepub fn replica_id_field(self, field_name: String) -> Self
pub fn replica_id_field(self, field_name: String) -> Self
Set the replica ID field name
Sourcepub fn build(self) -> CrdtBuilderConfig
pub fn build(self) -> CrdtBuilderConfig
Build the CRDT configuration
Sourcepub fn create_crdt(self, replica_id: ReplicaId) -> CustomCrdt
pub fn create_crdt(self, replica_id: ReplicaId) -> CustomCrdt
Create a new CRDT instance
Auto Trait Implementations§
impl Freeze for CrdtBuilder
impl RefUnwindSafe for CrdtBuilder
impl Send for CrdtBuilder
impl Sync for CrdtBuilder
impl Unpin for CrdtBuilder
impl UnwindSafe for CrdtBuilder
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