pub enum Operation {
Insert {
node: Node,
placement: Placement,
},
InsertParent {
target: String,
parent: Node,
},
Remove(Vec<String>),
Move {
ids: Vec<String>,
placement: Placement,
},
Copy {
ids: Vec<String>,
placement: Placement,
},
SetTopic {
id: String,
topic: String,
},
SetExpanded {
id: String,
expanded: bool,
},
SetNote {
id: String,
note: Option<String>,
},
SetImage {
id: String,
image: Option<NodeImage>,
},
SetLayout(LayoutDirection),
SetCompact(bool),
}Expand description
A mutation performed atomically through the core state.
Variants§
Insert
Insert a new subtree.
InsertParent
Wrap a non-root node in a newly supplied leaf.
Remove(Vec<String>)
Remove nodes; selected descendants of selected ancestors are deduplicated.
Move
Move an ordered group, retaining all IDs.
Copy
Copy an ordered group, generating new IDs throughout every subtree.
SetTopic
Replace a plain-text topic. Empty/whitespace-only edits are rejected.
SetExpanded
Change visibility of a node’s descendants.
SetNote
Replace or clear a plain-text note. Blank notes are stored as None.
SetImage
Replace or clear a node picture.
SetLayout(LayoutDirection)
Change document layout.
SetCompact(bool)
Change compact spacing.
Trait Implementations§
impl Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Forget for Operation
impl Freeze for Operation
impl Move for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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> DependencyElement for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.