pub fn clear_at(&mut self, action: &A, input_mode: InputMode, index: u8) -> Option<UserInput> {
        let mut bindings = self.get(action, Some(input_mode));
        if (bindings.len() as u8) < index {
            // Not enough matching bindings were found
            return None;
        }

        // Clear out existing mappings for that input mode
        self.clear_action(action, Some(input_mode));

        // Remove the binding at the provided index
        let removed = bindings.take_at(index as usize);

        // Reinsert the other bindings
        for input in bindings.iter() {
            self.insert(action.clone(), input.clone());
        }

        // Cache clashes now, to ensure a clean state
        self.cache_possible_clashes();

        removed
    }
/// Clears the input for the `action` with the specified [`InputMode`] at the provided index
///
/// Returns the removed input, if any
Clears the input for the `action` with the specified [`InputMode`] at the provided index
Returns the removed input, if any
Clears the input for the ` action ` with the specified [ ` InputMode ` ] at the provided index Returns the removed input if any
pub fn clear_at(&mut self, action: &A, input_mode: InputMode, index: u8) -> Option<UserInput> {
        let mut bindings = self.get(action, Some(input_mode));
        if (bindings.len() as u8) < index {
            // Not enough matching bindings were found
            return None;
        }
        // Clear out existing mappings for that input mode
        self.clear_action(action, Some(input_mode));
        // Remove the binding at the provided index
        let removed = bindings.take_at(index as usize);
        // Reinsert the other bindings
        for input in bindings.iter() {
            self.insert(action.clone(), input.clone());
        }
        // Cache clashes now, to ensure a clean state
        self.cache_possible_clashes();
        removed
    }
pub fn clear_at ( & mut self , action : & A , input_mode : InputMode , index : u8 ) -> Option < UserInput > { let mut bindings = self . get ( action , Some ( input_mode ) ) ; if ( bindings . len ( ) as u8 ) < index { // Not enough matching bindings were found return None ; } // Clear out existing mappings for that input mode self . clear_action ( action , Some ( input_mode ) ) ; // Remove the binding at the provided index let removed = bindings . take_at ( index as usize ) ; // Reinsert the other bindings for input in bindings . iter ( ) { self . insert ( action . clone ( ) , input . clone ( ) ) ; } // Cache clashes now, to ensure a clean state self . cache_possible_clashes ( ) ; removed }
Clears the input for the `action` with the specified [`InputMode`] at the provided index
Returns the removed input, if any
Clears the input for the ` action ` with the specified [ ` InputMode ` ] at the provided index Returns the removed input if any
&mut self
action
&A
input_mode
InputMode
index
u8
&mut self
action
&A
input_mode
InputMode
index
u8