pub struct ActionOverride {
pub action: String,
pub bindings: Vec<Binding>,
}Expand description
One action whose bindings differ from its declaration.
Fields§
§action: StringThe action’s name.
bindings: Vec<Binding>The bindings the player chose, in place of the declared ones.
Implementations§
Source§impl ActionOverride
impl ActionOverride
Sourcepub fn from_text(
action: &str,
texts: &[String],
) -> Result<Self, OverrideRefusal>
pub fn from_text( action: &str, texts: &[String], ) -> Result<Self, OverrideRefusal>
One entry of a saved list in the bindings’ text form, read without a
map: for a caller that loads its rebinds before its ActionMap
exists, or keeps the list itself. Whether action is declared is the
map’s question, answered when the entry is applied.
§Errors
OverrideRefusal::BadBinding for the first text that does not parse:
the entry is refused whole, as ActionMap::apply_override_text
refuses it.
Sourcepub fn texts(&self) -> Vec<String>
pub fn texts(&self) -> Vec<String>
The bindings’ texts, in order: what Self::from_text reads back.
Trait Implementations§
Source§impl Clone for ActionOverride
impl Clone for ActionOverride
Source§impl Debug for ActionOverride
impl Debug for ActionOverride
Source§impl PartialEq for ActionOverride
impl PartialEq for ActionOverride
impl StructuralPartialEq for ActionOverride
Auto Trait Implementations§
impl Freeze for ActionOverride
impl RefUnwindSafe for ActionOverride
impl Send for ActionOverride
impl Sync for ActionOverride
impl Unpin for ActionOverride
impl UnsafeUnpin for ActionOverride
impl UnwindSafe for ActionOverride
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more