pub trait UndoManagerClient: Sized + 'static {
// Required methods
fn handle_platform_undo(
self: Handle<Self>,
app: &mut App,
direction: UndoDirection,
);
fn undo(self: Handle<Self>, app: &mut App);
fn redo(self: Handle<Self>, app: &mut App);
fn can_undo(self: Handle<Self>, app: &App) -> bool;
fn can_redo(self: Handle<Self>, app: &App) -> bool;
// Provided method
fn as_undo_manager_client(self: Handle<Self>) -> AnyUndoManagerClient { ... }
}Expand description
An interface to receive events from a native UndoManager.
Dart’s mixin UndoManagerClient.
Required Methods§
Sourcefn handle_platform_undo(
self: Handle<Self>,
app: &mut App,
direction: UndoDirection,
)
fn handle_platform_undo( self: Handle<Self>, app: &mut App, direction: UndoDirection, )
Requests that the client perform an undo or redo operation.
Currently only used on iOS 9+ when the undo or redo methods are invoked by the platform. For example, when using three-finger swipe gestures, the iPad keyboard, or voice control.
Sourcefn undo(self: Handle<Self>, app: &mut App)
fn undo(self: Handle<Self>, app: &mut App)
Reverts the value on the stack to the previous value.
Provided Methods§
Sourcefn as_undo_manager_client(self: Handle<Self>) -> AnyUndoManagerClient
fn as_undo_manager_client(self: Handle<Self>) -> AnyUndoManagerClient
This client as the erased AnyUndoManagerClient.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".