zng_ext_undo

Trait 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 Txt

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 Self: Sized,

Source§

impl UndoInfo for BoxedVar<Txt>

Implementors§