Skip to main content

ActionMapExt

Trait ActionMapExt 

Source
pub trait ActionMapExt: IsA<ActionMap> + 'static {
    // Provided methods
    fn add_action(&self, action: &impl IsA<Action>) { ... }
    fn lookup_action(&self, action_name: &str) -> Option<Action> { ... }
    fn remove_action(&self, action_name: &str) { ... }
}
Expand description

Trait containing all ActionMap methods.

§Implementors

ActionMap, Application, SimpleActionGroup

Provided Methods§

Source

fn add_action(&self, action: &impl IsA<Action>)

Adds an action to the @self.

If the action map already contains an action with the same name as @action then the old action is dropped from the action map.

The action map takes its own reference on @action.

§action

a Action

Source

fn lookup_action(&self, action_name: &str) -> Option<Action>

Looks up the action with the name @action_name in @self.

If no such action exists, returns NULL.

§action_name

the name of an action

§Returns

a Action

Source

fn remove_action(&self, action_name: &str)

Removes the named action from the action map.

If no action of this name is in the map then nothing happens.

§action_name

the name of the action

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O> ActionMapExt for O
where O: IsA<ActionMap>,