Enum Delta
pub enum Delta<T = Out> {
Inserted(T, Option<Box<HashMap<Arc<str>, Any>>>),
Deleted(u32),
Retain(u32, Option<Box<HashMap<Arc<str>, Any>>>),
}Expand description
A single change done over a text-like types: Text or [XmlText].
Variants§
Inserted(T, Option<Box<HashMap<Arc<str>, Any>>>)
Determines a change that resulted in insertion of a piece of text, which optionally could have been formatted with provided set of attributes.
Deleted(u32)
Determines a change that resulted in removing a consecutive range of characters.
Retain(u32, Option<Box<HashMap<Arc<str>, Any>>>)
Determines a number of consecutive unchanged characters. Used to recognize non-edited spaces between Delta::Inserted and/or Delta::Deleted chunks. Can contain an optional set of attributes, which have been used to format an existing piece of text.
Implementations§
Trait Implementations§
impl<T> StructuralPartialEq for Delta<T>
Auto Trait Implementations§
impl<T> Freeze for Delta<T>where
T: Freeze,
impl<T> RefUnwindSafe for Delta<T>where
T: RefUnwindSafe,
impl<T> Send for Delta<T>where
T: Send,
impl<T> Sync for Delta<T>where
T: Sync,
impl<T> Unpin for Delta<T>where
T: Unpin,
impl<T> UnwindSafe for Delta<T>where
T: 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> CompatExt for T
impl<T> CompatExt 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>
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