Enum streampager::bindings::Binding[][src]

pub enum Binding {
    Action(Action),
    Custom(CustomBinding),
    Unrecognized(String),
}

An action that may be bound to a key.

Variants

Action(Action)

An action.

A custom binding.

Unrecognized(String)

An unrecognised binding.

Implementations

impl Binding[src]

pub fn custom(
    category: Category,
    description: impl Into<String>,
    callback: impl Fn(FileIndex) + Send + Sync + 'static
) -> Self
[src]

Create new custom binding.

When this binding is invoked, the callback is called. The callback is provided with the file index of the file that is currently being displayed. Note that this may differ from any of the file indexes returned by the add methods on the Pager, as additional file indexes can be allocated, e.g. for the help screen.

pub fn parse(ident: String, params: Vec<String>) -> Result<Self, BindingError>[src]

Parse a keybinding identifier and list of parameters into a key binding.

Trait Implementations

impl Clone for Binding[src]

impl Debug for Binding[src]

impl Display for Binding[src]

impl Eq for Binding[src]

impl From<Action> for Binding[src]

impl Hash for Binding[src]

impl PartialEq<Binding> for Binding[src]

impl StructuralEq for Binding[src]

impl StructuralPartialEq for Binding[src]

Auto Trait Implementations

impl !RefUnwindSafe for Binding

impl Send for Binding

impl Sync for Binding

impl Unpin for Binding

impl !UnwindSafe for Binding

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,