Struct ywasm::UndoManager
source · pub struct UndoManager(/* private fields */);
Implementations§
source§impl YUndoManager
impl YUndoManager
pub fn new( doc: &YDoc, scope: JsValue, options: JsValue, ) -> Result<YUndoManager, JsValue>
pub fn add_to_scope(&mut self, ytypes: Array) -> Result<(), JsValue>
pub fn add_tracked_origin(&mut self, origin: JsValue)
pub fn remove_tracked_origin(&mut self, origin: JsValue)
pub fn clear(&mut self) -> Result<(), JsValue>
pub fn stop_capturing(&mut self)
pub fn undo(&mut self) -> Result<(), JsValue>
pub fn redo(&mut self) -> Result<(), JsValue>
pub fn can_undo(&mut self) -> bool
pub fn can_redo(&mut self) -> bool
pub fn on(&mut self, event: &str, callback: Function) -> Result<(), JsValue>
pub fn off(&mut self, event: &str, callback: Function) -> Result<bool, JsValue>
Trait Implementations§
source§impl From<YUndoManager> for JsValue
impl From<YUndoManager> for JsValue
source§fn from(value: YUndoManager) -> Self
fn from(value: YUndoManager) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for YUndoManager
impl FromWasmAbi for YUndoManager
source§impl IntoWasmAbi for YUndoManager
impl IntoWasmAbi for YUndoManager
source§impl LongRefFromWasmAbi for YUndoManager
impl LongRefFromWasmAbi for YUndoManager
source§impl OptionFromWasmAbi for YUndoManager
impl OptionFromWasmAbi for YUndoManager
source§impl OptionIntoWasmAbi for YUndoManager
impl OptionIntoWasmAbi for YUndoManager
source§impl RefFromWasmAbi for YUndoManager
impl RefFromWasmAbi for YUndoManager
§type Anchor = Ref<'static, YUndoManager>
type Anchor = Ref<'static, YUndoManager>
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 YUndoManager
impl RefMutFromWasmAbi for YUndoManager
source§impl TryFromJsValue for YUndoManager
impl TryFromJsValue for YUndoManager
source§impl VectorFromWasmAbi for YUndoManager
impl VectorFromWasmAbi for YUndoManager
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[YUndoManager]>
source§impl VectorIntoWasmAbi for YUndoManager
impl VectorIntoWasmAbi for YUndoManager
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[YUndoManager]>) -> Self::Abi
source§impl WasmDescribeVector for YUndoManager
impl WasmDescribeVector for YUndoManager
Auto Trait Implementations§
impl Freeze for YUndoManager
impl !RefUnwindSafe for YUndoManager
impl !Send for YUndoManager
impl !Sync for YUndoManager
impl Unpin for YUndoManager
impl !UnwindSafe for YUndoManager
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
.