pub trait CSNameMap<C: Character, CS: CSName<C>, A: Clone>: Clone + Default {
// Required methods
fn get(&self, cs: &CS) -> Option<&A>;
fn insert(&mut self, cs: CS, a: A) -> Option<A>;
fn remove(&mut self, cs: &CS) -> Option<A>;
fn into_iter(self) -> impl Iterator<Item = (CS, A)>;
}Expand description
How to map control sequence names to e.g. Commands.
Required Methods§
Sourcefn get(&self, cs: &CS) -> Option<&A>
fn get(&self, cs: &CS) -> Option<&A>
Returns the value associated with the given control sequence name, if any.
Sourcefn insert(&mut self, cs: CS, a: A) -> Option<A>
fn insert(&mut self, cs: CS, a: A) -> Option<A>
Inserts a new value for the given control sequence name, returning the old value if any.
Sourcefn remove(&mut self, cs: &CS) -> Option<A>
fn remove(&mut self, cs: &CS) -> Option<A>
Removes the value associated with the given control sequence name, returning it if any.
fn into_iter(self) -> impl Iterator<Item = (CS, A)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.