[][src]Struct alacritty::config::bindings::Binding

pub struct Binding<T> {
    pub mods: ModifiersState,
    pub action: Action,
    pub mode: BindingMode,
    pub notmode: BindingMode,
    pub trigger: T,
}

Describes a state and action to take in that state.

This is the shared component of MouseBinding and KeyBinding.

Fields

mods: ModifiersState

Modifier keys required to activate binding.

action: Action

String to send to PTY if mods and mode match.

mode: BindingMode

Binding mode required to activate binding.

notmode: BindingMode

Excluded binding modes where the binding won't be activated.

trigger: T

This property is used as part of the trigger detection code.

For example, this might be a key like "G", or a mouse button.

Implementations

impl<T: Eq> Binding<T>[src]

pub fn is_triggered_by(
    &self,
    mode: BindingMode,
    mods: ModifiersState,
    input: &T
) -> bool
[src]

pub fn triggers_match(&self, binding: &Binding<T>) -> bool[src]

Trait Implementations

impl<T: Clone> Clone for Binding<T>[src]

impl<T: Debug> Debug for Binding<T>[src]

impl<'a> Deserialize<'a> for Binding<MouseButton>[src]

impl<'a> Deserialize<'a> for Binding<Key>[src]

impl<T: Eq> Eq for Binding<T>[src]

impl<T, U: EventListener> Execute<U> for Binding<T>[src]

fn execute<A: ActionContext<U>>(&self, ctx: &mut A)[src]

Execute the action associate with this binding.

impl<T: PartialEq> PartialEq<Binding<T>> for Binding<T>[src]

impl<T> StructuralEq for Binding<T>[src]

impl<T> StructuralPartialEq for Binding<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Binding<T> where
    T: RefUnwindSafe

impl<T> Send for Binding<T> where
    T: Send

impl<T> Sync for Binding<T> where
    T: Sync

impl<T> Unpin for Binding<T> where
    T: Unpin

impl<T> UnwindSafe for Binding<T> where
    T: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.