pub enum Patch {
SetRoot(Node),
Insert {
parent: Vec<String>,
index: u32,
node: Node,
},
Remove {
parent: Vec<String>,
key: String,
},
Move {
parent: Vec<String>,
key: String,
to: u32,
},
SetProp {
path: Vec<String>,
name: String,
value: Option<Value>,
},
SetBinding {
path: Vec<String>,
binding: Option<Binding>,
},
SetEvent {
path: Vec<String>,
event: String,
action: Option<Event>,
},
SetAnchor {
path: Vec<String>,
anchor: Option<String>,
},
SpliceProp {
path: Vec<String>,
name: String,
at: u32,
remove: u32,
insert: Vec<Value>,
},
}Expand description
One change of a level’s tree, against the tree the ones before it left. Paths are keys from the root’s children down; the root is the empty path.
Variants§
SetRoot(Node)
The root itself changed kind or key: the tree anew.
Insert
Remove
Move
SetProp
SetBinding
SetEvent
SetAnchor
SpliceProp
Part of a list prop replaced in place: remove items from at on taken out and
insert put there. A long list (a collection’s items) changes by what changed, never
sent whole again.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Patch
impl<'de> Deserialize<'de> for Patch
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
impl StructuralPartialEq for Patch
Auto Trait Implementations§
impl Forget for Patch
impl Freeze for Patchwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
*const LeafNode<String, Event> is !null: Freeze,
PhantomData<Box<(String, Event)>>: Freeze,
PhantomData<Node>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Value>: Freeze,
*const Value is !null: Freeze,
PhantomData<(String, Value)>: Freeze,
PhantomData<Block>: Freeze,
PhantomData<Embed>: Freeze,
*const LeafNode<String, BTreeMap<String, Attr>> is !null: Freeze,
PhantomData<Box<(String, BTreeMap<String, Attr>)>>: Freeze,
PhantomData<(Value, Value)>: Freeze,
impl Move for Patch
impl RefUnwindSafe for Patch
impl Send for Patchwhere
RawVecInner: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
NodeRef<Owned, String, Event, LeafOrInternal>: Send,
BoxRaw<(String, Event)>: Send,
BoxRaw<Value>: Send,
NodeRef<Owned, String, Attr, LeafOrInternal>: Send,
BoxRaw<(String, Attr)>: Send,
NodeRef<Owned, String, BTreeMap<String, Attr>, LeafOrInternal>: Send,
BoxRaw<(String, BTreeMap<String, Attr>)>: Send,
impl Sync for Patchwhere
RawVecInner: Sync,
NodeRef<Owned, String, Value, LeafOrInternal>: Sync,
BoxRaw<(String, Value)>: Sync,
NodeRef<Owned, String, Event, LeafOrInternal>: Sync,
BoxRaw<(String, Event)>: Sync,
BoxRaw<Value>: Sync,
NodeRef<Owned, String, Attr, LeafOrInternal>: Sync,
BoxRaw<(String, Attr)>: Sync,
NodeRef<Owned, String, BTreeMap<String, Attr>, LeafOrInternal>: Sync,
BoxRaw<(String, BTreeMap<String, Attr>)>: Sync,
impl Unpin for Patchwhere
*const u8 is !null: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
*const LeafNode<String, Event> is !null: Unpin,
Box<(String, Event)>: Unpin,
Box<Value>: Unpin,
*const LeafNode<String, Attr> is !null: Unpin,
Box<(String, Attr)>: Unpin,
*const LeafNode<String, BTreeMap<String, Attr>> is !null: Unpin,
Box<(String, BTreeMap<String, Attr>)>: Unpin,
impl UnsafeUnpin for Patchwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
*const LeafNode<String, Event> is !null: UnsafeUnpin,
PhantomData<Box<(String, Event)>>: UnsafeUnpin,
PhantomData<Node>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const Value is !null: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
PhantomData<Block>: UnsafeUnpin,
PhantomData<Embed>: UnsafeUnpin,
*const LeafNode<String, BTreeMap<String, Attr>> is !null: UnsafeUnpin,
PhantomData<Box<(String, BTreeMap<String, Attr>)>>: UnsafeUnpin,
PhantomData<(Value, Value)>: UnsafeUnpin,
impl UnwindSafe for Patchwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, Event>: UnwindSafe,
BoxRaw<Value>: UnwindSafe,
BTreeMap<String, Attr>: UnwindSafe,
BTreeMap<String, BTreeMap<String, Attr>>: UnwindSafe,
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more