Struct streampager::bindings::CustomBinding[][src]

pub struct CustomBinding { /* fields omitted */ }

A custom binding. This can be used by applications using streampager to add custom actions on keys.

Implementations

impl CustomBinding[src]

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

Create a new custom binding.

The category and description are used in the help screen. The callback is executed whenever the binding is triggered.

pub fn run(&self, file_index: FileIndex)[src]

Trigger the binding and run its callback.

Trait Implementations

impl Clone for CustomBinding[src]

impl Debug for CustomBinding[src]

impl Eq for CustomBinding[src]

impl Hash for CustomBinding[src]

impl PartialEq<CustomBinding> for CustomBinding[src]

Auto Trait Implementations

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, 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>,