Struct cvar::Action [] [src]

pub struct Action<N, D, F> where
    N: Borrow<str>,
    D: Borrow<str>,
    F: OnInvoke
{ /* fields omitted */ }

Action instance.

The Name and Description types allow abstracting over &'static str, &'a str and String. This supports dynamic cvars while only paying for what you need.

F is the callable type called when the action is invoked.

Methods

impl<N, D> Action<N, D, Pass> where
    N: Borrow<str>,
    D: Borrow<str>, 
[src]

Creates a new Action.

Given a name, description and a callback to be invoked.

Trait Implementations

impl<N, D, F> INode for Action<N, D, F> where
    N: Borrow<str>,
    D: Borrow<str>,
    F: OnInvoke
[src]

Returns the node name.

Returns the node description.

impl<N, D, F> IAction for Action<N, D, F> where
    N: Borrow<str>,
    D: Borrow<str>,
    F: OnInvoke
[src]

Invoke the callback associated with the Action.