pub enum Mutation {
AddNode(NodeSnapshot),
RemoveNode(NodeId),
AddLink(SnapshotEdge),
RemoveLink(LinkId),
}Available on crate feature
topology only.Expand description
A pure-data edit applicable to a TopologySnapshot via
TopologySnapshot::apply.
Mutations are themselves serializable, so a session store can log/replicate
a stream of Mutations and replay them onto a baseline snapshot.
Variants§
AddNode(NodeSnapshot)
Add (or replace) the node with the given snapshot.
RemoveNode(NodeId)
Remove the node with the given id (and its incident edges).
AddLink(SnapshotEdge)
Add the given edge.
RemoveLink(LinkId)
Remove the edge at the given positional LinkId.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mutation
impl<'de> Deserialize<'de> for Mutation
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 Mutation
Auto Trait Implementations§
impl Freeze for Mutation
impl RefUnwindSafe for Mutation
impl Send for Mutation
impl Sync for Mutation
impl Unpin for Mutation
impl UnsafeUnpin for Mutation
impl UnwindSafe for Mutation
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