pub fn insert_action_binding<A>(&mut self, id: A, binding: Button)
    where
        A: Hash + Eq + Into<AC>,
        AC: Borrow<A>,
    {
        let mut make_new = false;
        match self.actions.get_mut(&id) {
            Some(action_bindings) => if action_bindings.iter().all(|&b| b != binding) {
                action_bindings.push(binding);
            },
            None => {
                make_new = true;
            }
        }
        if make_new {
            let mut bindings = SmallVec::new();
            bindings.push(binding);
            self.actions.insert(id.into(), bindings);
        }
    }
/// Add a button to an action.
///
/// This will insert a new binding between this action and the button.
Add a button to an action.
This will insert a new binding between this action and the button.
Add a button to an action . This will insert a new binding between this action and the button .
pub fn insert_action_binding<A>(&mut self, id: A, binding: Button)
    where
        A: Hash + Eq + Into<AC>,
        AC: Borrow<A>,
    {
        let mut make_new = false;
        match self.actions.get_mut(&id) {
            Some(action_bindings) => if action_bindings.iter().all(|&b| b != binding) {
                action_bindings.push(binding);
            },
            None => {
                make_new = true;
            }
        }
        if make_new {
            let mut bindings = SmallVec::new();
            bindings.push(binding);
            self.actions.insert(id.into(), bindings);
        }
    }
pub fn insert_action_binding < A > ( & mut self , id : A , binding : Button ) where A : Hash + Eq + Into < AC > , AC : Borrow < A > , { let mut make_new = false ; match self . actions . get_mut ( & id ) { Some ( action_bindings ) => if action_bindings . iter ( ) . all ( | & b | b != binding ) { action_bindings . push ( binding ) ; } , None => { make_new = true ; } } if make_new { let mut bindings = SmallVec :: new ( ) ; bindings . push ( binding ) ; self . actions . insert ( id . into ( ) , bindings ) ; } }
Add a button to an action.
Add a button to an action .
&mut self
id
A
binding
Button
&mut self
id
A
binding
Button