[][src]Struct mt_dom::patch::ChangeText

pub struct ChangeText<'a> {
    pub node_idx: NodeIdx,
    pub old: &'a str,
    pub new: &'a str,
}

The patch is changing the text content of a text node

Fields

node_idx: NodeIdx

node index of the text node to be patch relative to the root node of the application

old: &'a str

the old text is not really needed for applying the patch. but it is useful for debugging purposed, that we are changing the intended target text by visual inspection

new: &'a str

the neew text patch

Implementations

impl<'a> ChangeText<'a>[src]

pub fn new(node_idx: NodeIdx, old: &'a str, new: &'a str) -> Self[src]

create a new change text patch

pub fn get_new(&self) -> &'a str[src]

return the replacement text for the patch

Trait Implementations

impl<'a> Debug for ChangeText<'a>[src]

impl<'a, NS, TAG, ATT, VAL, EVENT, MSG> From<ChangeText<'a>> for Patch<'a, NS, TAG, ATT, VAL, EVENT, MSG>[src]

impl<'a> PartialEq<ChangeText<'a>> for ChangeText<'a>[src]

impl<'a> StructuralPartialEq for ChangeText<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ChangeText<'a>

impl<'a> Send for ChangeText<'a>

impl<'a> Sync for ChangeText<'a>

impl<'a> Unpin for ChangeText<'a>

impl<'a> UnwindSafe for ChangeText<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.