pub struct TextEvent { /* private fields */ }
Expand description
Event generated by YYText.observe
method. Emitted during transaction commit phase.
Implementations§
source§impl YTextEvent
impl YTextEvent
sourcepub fn path(&self) -> JsValue
pub fn path(&self) -> JsValue
Returns an array of keys and indexes creating a path from root type down to current instance
of shared type (accessible via target
getter).
sourcepub fn target(&mut self) -> JsValue
pub fn target(&mut self) -> JsValue
Returns a current shared type instance, that current event changes refer to.
pub fn origin(&mut self) -> JsValue
sourcepub fn delta(&mut self) -> Result<JsValue, JsValue>
pub fn delta(&mut self) -> Result<JsValue, JsValue>
Returns a list of text changes made over corresponding YText
collection within
bounds of current transaction. These changes follow a format:
- { insert: string, attributes: any|undefined }
- { delete: number }
- { retain: number, attributes: any|undefined }
Trait Implementations§
source§impl From<YTextEvent> for JsValue
impl From<YTextEvent> for JsValue
source§fn from(value: YTextEvent) -> Self
fn from(value: YTextEvent) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for YTextEvent
impl FromWasmAbi for YTextEvent
source§impl IntoWasmAbi for YTextEvent
impl IntoWasmAbi for YTextEvent
source§impl LongRefFromWasmAbi for YTextEvent
impl LongRefFromWasmAbi for YTextEvent
source§impl OptionFromWasmAbi for YTextEvent
impl OptionFromWasmAbi for YTextEvent
source§impl OptionIntoWasmAbi for YTextEvent
impl OptionIntoWasmAbi for YTextEvent
source§impl RefFromWasmAbi for YTextEvent
impl RefFromWasmAbi for YTextEvent
§type Anchor = Ref<'static, YTextEvent>
type Anchor = Ref<'static, YTextEvent>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for YTextEvent
impl RefMutFromWasmAbi for YTextEvent
source§impl TryFromJsValue for YTextEvent
impl TryFromJsValue for YTextEvent
source§impl VectorFromWasmAbi for YTextEvent
impl VectorFromWasmAbi for YTextEvent
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[YTextEvent]>
source§impl VectorIntoWasmAbi for YTextEvent
impl VectorIntoWasmAbi for YTextEvent
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[YTextEvent]>) -> Self::Abi
source§impl WasmDescribeVector for YTextEvent
impl WasmDescribeVector 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
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.