pub enum MarkupEdit {
SetTitle {
old: Option<String>,
new: Option<String>,
},
InsertBlock {
index: usize,
block: MarkupBlock,
},
ReplaceBlock {
index: usize,
old: MarkupBlock,
new: MarkupBlock,
},
DeleteBlock {
index: usize,
old: MarkupBlock,
},
SetInlineText {
block: usize,
path: Vec<usize>,
old: String,
new: String,
},
}Expand description
A reversible edit over a semantic markup document.
Variants§
SetTitle
Replace the document title.
Fields
InsertBlock
Insert a block at an index.
ReplaceBlock
Replace the block at an index.
DeleteBlock
Delete the block at an index.
SetInlineText
Replace a text inline inside a block.
Implementations§
Trait Implementations§
Source§impl Clone for MarkupEdit
impl Clone for MarkupEdit
Source§fn clone(&self) -> MarkupEdit
fn clone(&self) -> MarkupEdit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkupEdit
impl Debug for MarkupEdit
Source§impl PartialEq for MarkupEdit
impl PartialEq for MarkupEdit
impl StructuralPartialEq for MarkupEdit
Auto Trait Implementations§
impl Freeze for MarkupEdit
impl RefUnwindSafe for MarkupEdit
impl Send for MarkupEdit
impl Sync for MarkupEdit
impl Unpin for MarkupEdit
impl UnsafeUnpin for MarkupEdit
impl UnwindSafe for MarkupEdit
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> 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