pub struct GenericCrdtField {
pub name: String,
pub value: Value,
pub strategy: CrdtStrategy,
pub metadata: HashMap<String, Value>,
}
Expand description
Generic CRDT field implementation
Fields§
§name: String
Field name
value: Value
Field value
strategy: CrdtStrategy
CRDT strategy
metadata: HashMap<String, Value>
Field metadata (timestamps, replica IDs, etc.)
Implementations§
Source§impl GenericCrdtField
impl GenericCrdtField
Sourcepub fn new(name: String, value: Value, strategy: CrdtStrategy) -> Self
pub fn new(name: String, value: Value, strategy: CrdtStrategy) -> Self
Create a new generic CRDT field
Trait Implementations§
Source§impl Clone for GenericCrdtField
impl Clone for GenericCrdtField
Source§fn clone(&self) -> GenericCrdtField
fn clone(&self) -> GenericCrdtField
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 CrdtField for GenericCrdtField
impl CrdtField for GenericCrdtField
Source§fn has_conflict(&self, other: &Self) -> bool
fn has_conflict(&self, other: &Self) -> bool
Check if there’s a conflict with another field
Source§fn strategy(&self) -> CrdtStrategy
fn strategy(&self) -> CrdtStrategy
Get the field strategy
Source§impl Debug for GenericCrdtField
impl Debug for GenericCrdtField
Source§impl<'de> Deserialize<'de> for GenericCrdtField
impl<'de> Deserialize<'de> for GenericCrdtField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenericCrdtField
impl PartialEq for GenericCrdtField
Source§impl Serialize for GenericCrdtField
impl Serialize for GenericCrdtField
impl StructuralPartialEq for GenericCrdtField
Auto Trait Implementations§
impl Freeze for GenericCrdtField
impl RefUnwindSafe for GenericCrdtField
impl Send for GenericCrdtField
impl Sync for GenericCrdtField
impl Unpin for GenericCrdtField
impl UnwindSafe for GenericCrdtField
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> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
Tries to deserialize the data, given only the
submit
event.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.