Enum PatchAction
pub enum PatchAction {
PutMap {
key: String,
value: (Value<'static>, ExId),
conflict: bool,
},
PutSeq {
index: usize,
value: (Value<'static>, ExId),
conflict: bool,
},
Insert {
index: usize,
values: SequenceTreeInternal<(Value<'static>, ExId, bool)>,
},
SpliceText {
index: usize,
value: ConcreteTextValue,
marks: Option<MarkSet>,
},
Increment {
prop: Prop,
value: i64,
},
Conflict {
prop: Prop,
},
DeleteMap {
key: String,
},
DeleteSeq {
index: usize,
length: usize,
},
Mark {
marks: Vec<Mark>,
},
}Variants§
PutMap
A key was created or updated in a map
Fields
value: (Value<'static>, ExId)The value that was inserted and the object ID of the object that was inserted. Note
that the Object ID is only meaningful for Value::Obj values
conflict: boolWhether there is a conflict at this key. If there is a conflict this patch represents
the “winning” value of the conflict. The conflicting values can be obtained with
crate::ReadDoc::get_all
PutSeq
An index in a sequence was updated
Fields
value: (Value<'static>, ExId)The value that was set and the object ID of the object that was set. Note that the
Object ID is only meaningful for Value::Obj values
conflict: boolWhether there is a conflict at this index. If there is a conflict this patch represents
the “winning” value of the conflict. The conflicting values can be obtained with
crate::ReadDoc::get_all
Insert
One or more elements were inserted into a sequence
Fields
values: SequenceTreeInternal<(Value<'static>, ExId, bool)>The values that were inserted, in order that they appear. As with Self::PutMap and
Self::PutSeq the object ID is only meaningful for Value::Obj values
SpliceText
Some text was spliced into a text object
Fields
value: ConcreteTextValueThe text that was inserted
Increment
A counter was incremented
Fields
Conflict
A new conflict has appeared
DeleteMap
A key was deleted from a map
DeleteSeq
One or more indices were removed from a sequence
Mark
Some marks within a text object were added or removed
Trait Implementations§
§impl Clone for PatchAction
impl Clone for PatchAction
§fn clone(&self) -> PatchAction
fn clone(&self) -> PatchAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PatchAction
impl Debug for PatchAction
§impl Display for PatchAction
impl Display for PatchAction
§impl PartialEq for PatchAction
impl PartialEq for PatchAction
impl StructuralPartialEq for PatchAction
Auto Trait Implementations§
impl Freeze for PatchAction
impl RefUnwindSafe for PatchAction
impl Send for PatchAction
impl Sync for PatchAction
impl Unpin for PatchAction
impl UnsafeUnpin for PatchAction
impl UnwindSafe for PatchAction
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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