Struct yrs::YArrayEvent
source · [−]#[repr(C)]pub struct YArrayEvent {
pub txn: *const Transaction,
/* 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.
Fields
txn: *const TransactionMethods from Deref<Target = ArrayEvent>
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) -> &[Change]
pub fn delta(&self, txn: &Transaction) -> &[Change]
Returns summary of changes made over corresponding Array collection within a bounds of current transaction.
sourcepub fn inserts(&self, txn: &Transaction) -> &HashSet<ID, RandomState>
pub fn inserts(&self, txn: &Transaction) -> &HashSet<ID, RandomState>
Returns a collection of block identifiers that have been added within a bounds of current transaction.
sourcepub fn removes(&self, txn: &Transaction) -> &HashSet<ID, RandomState>
pub fn removes(&self, txn: &Transaction) -> &HashSet<ID, RandomState>
Returns a collection of block identifiers that have been removed within a bounds of current transaction.
Trait Implementations
sourceimpl Clone for YArrayEvent
impl Clone for YArrayEvent
sourcefn clone(&self) -> YArrayEvent
fn clone(&self) -> YArrayEvent
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 YArrayEvent
impl Deref for YArrayEvent
type Target = ArrayEvent
type Target = ArrayEvent
The resulting type after dereferencing.
impl Copy for YArrayEvent
Auto Trait Implementations
impl !RefUnwindSafe for YArrayEvent
impl !Send for YArrayEvent
impl !Sync for YArrayEvent
impl Unpin for YArrayEvent
impl !UnwindSafe for YArrayEvent
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more