Struct Diff
pub struct Diff<T> {
pub insert: Out,
pub attributes: Option<Box<HashMap<Arc<str>, Any>>>,
pub ychange: Option<T>,
}Expand description
A representation of an uniformly-formatted chunk of rich context stored by TextRef or XmlTextRef. It contains a value (which could be a string, embedded object or another shared type) with optional formatting attributes wrapping around this chunk. It can also contain some custom data generated by caller as part of TextRef::diff callback.
Fields§
§insert: OutInserted chunk of data. It can be (usually) piece of text, but possibly also embedded value or another shared type.
attributes: Option<Box<HashMap<Arc<str>, Any>>>Optional formatting attributes wrapping inserted chunk of data.
ychange: Option<T>Custom user data attached to this chunk of data.
Implementations§
Trait Implementations§
impl<T> StructuralPartialEq for Diff<T>
Auto Trait Implementations§
impl<T> Freeze for Diff<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Diff<T>
impl<T> Send for Diff<T>where
T: Send,
impl<T> Sync for Diff<T>where
T: Sync,
impl<T> Unpin for Diff<T>where
T: Unpin,
impl<T> !UnwindSafe for Diff<T>
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
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.