pub struct OrderedList<T> { /* private fields */ }Expand description
A replicated growable ordered list with stable element dots.
Implementations§
Source§impl<T> OrderedList<T>
impl<T> OrderedList<T>
Source§impl<T> OrderedList<T>
impl<T> OrderedList<T>
Sourcepub fn insert_after(
&mut self,
parent: Option<Dot>,
dot: Dot,
value: T,
) -> Result<(), CrdtError>
pub fn insert_after( &mut self, parent: Option<Dot>, dot: Dot, value: T, ) -> Result<(), CrdtError>
Inserts a stable element after parent, or at the replicated root.
Sourcepub fn remove(
&mut self,
dot: Dot,
context: &VersionVector,
) -> Result<(), CrdtError>
pub fn remove( &mut self, dot: Dot, context: &VersionVector, ) -> Result<(), CrdtError>
Removes an element that is visible in context.
Sourcepub fn merge(&mut self, other: &OrderedList<T>) -> Result<(), CrdtError>
pub fn merge(&mut self, other: &OrderedList<T>) -> Result<(), CrdtError>
Deterministically combines another replica’s state.
Sourcepub fn canonicalize_for_commit(
&self,
author: AuthorId,
sequence: u64,
_context: &VersionVector,
next_operation: &mut u32,
) -> Result<OrderedList<T>, CrdtError>
pub fn canonicalize_for_commit( &self, author: AuthorId, sequence: u64, _context: &VersionVector, next_operation: &mut u32, ) -> Result<OrderedList<T>, CrdtError>
Rebuilds the visible sequence with commit-owned element identities.
Trait Implementations§
Source§impl<T> Clone for OrderedList<T>where
T: Clone,
impl<T> Clone for OrderedList<T>where
T: Clone,
Source§fn clone(&self) -> OrderedList<T>
fn clone(&self) -> OrderedList<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<T> Debug for OrderedList<T>where
T: Debug,
impl<T> Debug for OrderedList<T>where
T: Debug,
Source§impl<'bytes, Ctx, T> Decode<'bytes, Ctx> for OrderedList<T>where
T: Decode<'bytes, Ctx>,
impl<'bytes, Ctx, T> Decode<'bytes, Ctx> for OrderedList<T>where
T: Decode<'bytes, Ctx>,
Source§impl<T> Default for OrderedList<T>
impl<T> Default for OrderedList<T>
Source§fn default() -> OrderedList<T>
fn default() -> OrderedList<T>
Returns the “default value” for a type. Read more
Source§impl<Ctx, T> Encode<Ctx> for OrderedList<T>where
T: Encode<Ctx>,
impl<Ctx, T> Encode<Ctx> for OrderedList<T>where
T: Encode<Ctx>,
Source§impl<T> FieldState for OrderedList<T>
impl<T> FieldState for OrderedList<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<OrderedList<T>, RecordError>
fn decode_state(bytes: &[u8]) -> Result<OrderedList<T>, 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: &OrderedList<T>) -> Result<(), RecordError>
fn merge_state(&mut self, other: &OrderedList<T>) -> 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<OrderedList<T>, RecordError>
fn canonicalize_for_commit( &self, author: AuthorId, sequence: u64, context: &VersionVector, next_operation: &mut u32, ) -> Result<OrderedList<T>, 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.
Source§impl<T> Merge for OrderedList<T>
impl<T> Merge for OrderedList<T>
Source§impl<T> PartialEq for OrderedList<T>where
T: PartialEq,
impl<T> PartialEq for OrderedList<T>where
T: PartialEq,
impl<T> Eq for OrderedList<T>where
T: Eq,
impl<T> StructuralPartialEq for OrderedList<T>
Auto Trait Implementations§
impl<T> Freeze for OrderedList<T>
impl<T> RefUnwindSafe for OrderedList<T>where
T: RefUnwindSafe,
impl<T> Send for OrderedList<T>where
T: Send,
impl<T> Sync for OrderedList<T>where
T: Sync,
impl<T> Unpin for OrderedList<T>
impl<T> UnwindSafe for OrderedList<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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.