pub struct GrowOnlySet<T: Ord> { /* private fields */ }Expand description
A set whose only operation is insertion.
Implementations§
Source§impl<T: Ord> GrowOnlySet<T>
impl<T: Ord> GrowOnlySet<T>
Source§impl<T: Clone + Ord> GrowOnlySet<T>
impl<T: Clone + Ord> GrowOnlySet<T>
Sourcepub fn canonicalize_for_commit(
&self,
_author: AuthorId,
_sequence: u64,
_context: &VersionVector,
_next_operation: &mut u32,
) -> Result<Self, CrdtError>
pub fn canonicalize_for_commit( &self, _author: AuthorId, _sequence: u64, _context: &VersionVector, _next_operation: &mut u32, ) -> Result<Self, CrdtError>
Copies value-only state; this CRDT carries no caller-controlled causal metadata.
Trait Implementations§
Source§impl<T: Clone + Ord> Clone for GrowOnlySet<T>
impl<T: Clone + Ord> Clone for GrowOnlySet<T>
Source§fn clone(&self) -> GrowOnlySet<T>
fn clone(&self) -> GrowOnlySet<T>
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<'bytes, Ctx, T: Ord + Decode<'bytes, Ctx>> Decode<'bytes, Ctx> for GrowOnlySet<T>
impl<'bytes, Ctx, T: Ord + Decode<'bytes, Ctx>> Decode<'bytes, Ctx> for GrowOnlySet<T>
Source§impl<T: Ord> Default for GrowOnlySet<T>
impl<T: Ord> Default for GrowOnlySet<T>
Source§impl<Ctx, T: Ord + Encode<Ctx>> Encode<Ctx> for GrowOnlySet<T>
impl<Ctx, T: Ord + Encode<Ctx>> Encode<Ctx> for GrowOnlySet<T>
Source§impl<T> FieldState for GrowOnlySet<T>
impl<T> FieldState for GrowOnlySet<T>
Source§fn encode_state(&self) -> Result<Vec<u8>, RecordError>
fn encode_state(&self) -> Result<Vec<u8>, RecordError>
Encodes complete causal field state.
Source§fn decode_state(bytes: &[u8]) -> Result<Self, RecordError>
fn decode_state(bytes: &[u8]) -> Result<Self, RecordError>
Strictly decodes complete causal field state.
Source§fn visible_values(&self) -> Result<Vec<Vec<u8>>, RecordError>
fn visible_values(&self) -> Result<Vec<Vec<u8>>, RecordError>
Encodes each currently visible application value for filtering and indexes.
Source§fn merge_state(&mut self, other: &Self) -> Result<(), RecordError>
fn merge_state(&mut self, other: &Self) -> Result<(), RecordError>
Deterministically merges complete causal state from another replica.
Source§fn canonicalize_for_commit(
&self,
author: AuthorId,
sequence: u64,
context: &VersionVector,
next_operation: &mut u32,
) -> Result<Self, RecordError>
fn canonicalize_for_commit( &self, author: AuthorId, sequence: u64, context: &VersionVector, next_operation: &mut u32, ) -> Result<Self, RecordError>
Reissues all causal identities from one authenticated commit envelope.
Source§fn value_type_name() -> &'static str
fn value_type_name() -> &'static str
Stable Rust logical value type used in schema compatibility checks.
impl<T: Eq + Ord> Eq for GrowOnlySet<T>
impl<T: Ord> StructuralPartialEq for GrowOnlySet<T>
Auto Trait Implementations§
impl<T> Freeze for GrowOnlySet<T>
impl<T> RefUnwindSafe for GrowOnlySet<T>where
T: RefUnwindSafe,
impl<T> Send for GrowOnlySet<T>where
T: Send,
impl<T> Sync for GrowOnlySet<T>where
T: Sync,
impl<T> Unpin for GrowOnlySet<T>
impl<T> UnwindSafe for GrowOnlySet<T>where
T: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> RecordKey for T
impl<T> RecordKey for T
Source§fn encode_key(&self) -> Result<Vec<u8>, RecordError>
fn encode_key(&self) -> Result<Vec<u8>, RecordError>
Encodes this key into its unique durable representation.
Source§fn decode_key(bytes: &[u8]) -> Result<T, RecordError>
fn decode_key(bytes: &[u8]) -> Result<T, RecordError>
Strictly decodes a key from its unique durable representation.