pub struct CommandIndex<T> {
pub exact_match: BTreeMap<(CommandType, Cow<'static, str>), T>,
pub regex: Vec<(CommandType, Regex, T)>,
}Fields§
§exact_match: BTreeMap<(CommandType, Cow<'static, str>), T>§regex: Vec<(CommandType, Regex, T)>Implementations§
Source§impl<T> CommandIndex<T>
impl<T> CommandIndex<T>
pub fn get(&self, ty: CommandType, name: &str) -> Option<&T>
pub fn availables(&self) -> impl Iterator<Item = MatchCommand>
Trait Implementations§
Source§impl<T: Clone> Clone for CommandIndex<T>
impl<T: Clone> Clone for CommandIndex<T>
Source§fn clone(&self) -> CommandIndex<T>
fn clone(&self) -> CommandIndex<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for CommandIndex<T>
impl<T: Debug> Debug for CommandIndex<T>
Source§impl<T> Default for CommandIndex<T>
impl<T> Default for CommandIndex<T>
Source§impl<T> FromIterator<(MatchCommand, T)> for CommandIndex<T>
impl<T> FromIterator<(MatchCommand, T)> for CommandIndex<T>
Source§fn from_iter<I: IntoIterator<Item = (MatchCommand, T)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (MatchCommand, T)>>(iter: I) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl<T> Freeze for CommandIndex<T>
impl<T> RefUnwindSafe for CommandIndex<T>where
T: RefUnwindSafe,
impl<T> Send for CommandIndex<T>where
T: Send,
impl<T> Sync for CommandIndex<T>where
T: Sync,
impl<T> Unpin for CommandIndex<T>where
T: Unpin,
impl<T> UnwindSafe for CommandIndex<T>where
T: RefUnwindSafe + UnwindSafe,
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