Struct yrs::YTextEvent
source · [−]#[repr(C)]pub struct YTextEvent {
pub txn: *const Transaction,
/* 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.
Fields
txn: *const TransactionMethods from Deref<Target = TextEvent>
sourcepub fn path(&self) -> VecDeque<PathSegment, Global>
pub fn path(&self) -> VecDeque<PathSegment, Global>
Returns a path from root type down to Text instance which emitted this event.
sourcepub fn delta(&self, txn: &Transaction) -> &[Delta]
pub fn delta(&self, txn: &Transaction) -> &[Delta]
Returns a summary of text changes made over corresponding Text collection within bounds of current transaction.
Trait Implementations
sourceimpl Clone for YTextEvent
impl Clone for YTextEvent
sourcefn clone(&self) -> YTextEvent
fn clone(&self) -> YTextEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Deref for YTextEvent
impl Deref for YTextEvent
impl Copy for YTextEvent
Auto Trait Implementations
impl !RefUnwindSafe for YTextEvent
impl !Send for YTextEvent
impl !Sync for YTextEvent
impl Unpin for YTextEvent
impl !UnwindSafe for YTextEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more