Struct yrs::YArrayEvent
source · #[repr(C)]pub struct YArrayEvent { /* private fields */ }
Expand description
Event pushed into callbacks registered with yarray_observe
function. It contains delta of all
content changes made within a scope of corresponding transaction (see: yarray_event_delta
) as
well as navigation data used to identify a YArray
instance which triggered this event.
Methods from Deref<Target = ArrayEvent>§
sourcepub fn path(&self) -> VecDeque<PathSegment>
pub fn path(&self) -> VecDeque<PathSegment>
Returns a path from root type down to ArrayRef instance which emitted this event.
sourcepub fn delta(&self, txn: &TransactionMut<'_>) -> &[Change]
pub fn delta(&self, txn: &TransactionMut<'_>) -> &[Change]
Returns summary of changes made over corresponding ArrayRef collection within a bounds of current transaction.
sourcepub fn inserts(&self, txn: &TransactionMut<'_>) -> &HashSet<ID>
pub fn inserts(&self, txn: &TransactionMut<'_>) -> &HashSet<ID>
Returns a collection of block identifiers that have been added within a bounds of current transaction.
sourcepub fn removes(&self, txn: &TransactionMut<'_>) -> &HashSet<ID>
pub fn removes(&self, txn: &TransactionMut<'_>) -> &HashSet<ID>
Returns a collection of block identifiers that have been removed within a bounds of current transaction.
Trait Implementations§
source§impl Clone for YArrayEvent
impl Clone for YArrayEvent
source§fn clone(&self) -> YArrayEvent
fn clone(&self) -> YArrayEvent
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 YArrayEvent
impl Deref for YArrayEvent
impl Copy for YArrayEvent
Auto Trait Implementations§
impl Freeze for YArrayEvent
impl !RefUnwindSafe for YArrayEvent
impl !Send for YArrayEvent
impl !Sync for YArrayEvent
impl Unpin for YArrayEvent
impl !UnwindSafe for YArrayEvent
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