Struct yrs::YTextEvent
source · #[repr(C)]pub struct YTextEvent { /* private fields */ }
Expand description
Event pushed into callbacks registered with ytext_observe
function. It contains delta of all
text changes made within a scope of corresponding transaction (see: ytext_event_delta
) as
well as navigation data used to identify a YText
instance which triggered this event.
Methods from Deref<Target = TextEvent>§
sourcepub fn path(&self) -> VecDeque<PathSegment>
pub fn path(&self) -> VecDeque<PathSegment>
Returns a path from root type down to Text instance which emitted this event.
sourcepub fn delta(&self, txn: &TransactionMut<'_>) -> &[Delta]
pub fn delta(&self, txn: &TransactionMut<'_>) -> &[Delta]
Returns a summary of text changes made over corresponding Text collection within bounds of current transaction.
Trait Implementations§
source§impl Clone for YTextEvent
impl Clone for YTextEvent
source§fn clone(&self) -> YTextEvent
fn clone(&self) -> YTextEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Deref for YTextEvent
impl Deref for YTextEvent
impl Copy for YTextEvent
Auto Trait Implementations§
impl Freeze for YTextEvent
impl !RefUnwindSafe for YTextEvent
impl !Send for YTextEvent
impl !Sync for YTextEvent
impl Unpin for YTextEvent
impl !UnwindSafe for YTextEvent
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