Trait zng::undo::UndoInfo

source ·
pub trait UndoInfo:
    Send
    + Sync
    + Any {
    // Required method
    fn description(&self) -> Txt;

    // Provided methods
    fn meta(&self) -> StateMapRef<'_, UNDO> { ... }
    fn into_dyn(self) -> Arc<dyn UndoInfo>
       where Self: Sized { ... }
}
Expand description

Metadata info about an action registered for undo action.

Required Methods§

source

fn description(&self) -> Txt

Short display description of the action that will be undone/redone.

Provided Methods§

source

fn meta(&self) -> StateMapRef<'_, UNDO>

Any extra metadata associated with the item. This can be a thumbnail of an image edit action for example, or an icon.

Is empty by default.

source

fn into_dyn(self) -> Arc<dyn UndoInfo>
where Self: Sized,

Into Arc<dyn UndoInfo> without double wrapping.

Implementations on Foreign Types§

source§

impl UndoInfo for &'static str

source§

impl UndoInfo for Arc<dyn UndoInfo>

source§

fn description(&self) -> Txt

source§

fn meta(&self) -> StateMapRef<'_, UNDO>

source§

fn into_dyn(self) -> Arc<dyn UndoInfo>
where Arc<dyn UndoInfo>: Sized,

Implementors§