pub struct CommandList { /* private fields */ }Expand description
Ordered, prioritised list of named commands.
Implementations§
Source§impl CommandList
impl CommandList
pub fn new() -> Self
pub fn push(&mut self, name: &str, priority: CmdPriority)
pub fn push_tagged(&mut self, name: &str, priority: CmdPriority, tag: &str)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&CmdEntry>
pub fn enable(&mut self, name: &str)
pub fn disable(&mut self, name: &str)
pub fn enabled_names(&self) -> Vec<&str>
pub fn sorted_by_priority(&self) -> Vec<&CmdEntry>
pub fn by_tag(&self, tag: &str) -> Vec<&CmdEntry>
pub fn remove(&mut self, name: &str) -> bool
pub fn clear(&mut self)
pub fn contains(&self, name: &str) -> bool
Trait Implementations§
Source§impl Clone for CommandList
impl Clone for CommandList
Source§fn clone(&self) -> CommandList
fn clone(&self) -> CommandList
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 Debug for CommandList
impl Debug for CommandList
Source§impl Default for CommandList
impl Default for CommandList
Source§fn default() -> CommandList
fn default() -> CommandList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandList
impl RefUnwindSafe for CommandList
impl Send for CommandList
impl Sync for CommandList
impl Unpin for CommandList
impl UnsafeUnpin for CommandList
impl UnwindSafe for CommandList
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