Skip to main content

CommandManifest

Struct CommandManifest 

Source
pub struct CommandManifest<C: Category, T: Tag, S: Scope> { /* private fields */ }

Implementations§

Source§

impl<C: Category, T: Tag, S: Scope> CommandManifest<C, T, S>

Source

pub fn new() -> Self

Source

pub fn add(&mut self, def: CommandDef<C, T, S>) -> &mut Self

Source

pub fn get(&self, name: &str) -> Option<&CommandDef<C, T, S>>

Source

pub fn all_sorted(&self) -> Vec<&CommandDef<C, T, S>>

Source

pub fn by_category(&self, cat: C) -> Vec<&CommandDef<C, T, S>>

Source

pub fn by_tag(&self, tag: T) -> Vec<&CommandDef<C, T, S>>

Source

pub fn by_scope(&self, scope: S) -> Vec<&CommandDef<C, T, S>>

Source

pub fn categories_in_order(&self) -> Vec<C>

Trait Implementations§

Source§

impl<C: Default + Category, T: Default + Tag, S: Default + Scope> Default for CommandManifest<C, T, S>

Source§

fn default() -> CommandManifest<C, T, S>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<C, T, S> Freeze for CommandManifest<C, T, S>

§

impl<C, T, S> RefUnwindSafe for CommandManifest<C, T, S>

§

impl<C, T, S> Send for CommandManifest<C, T, S>
where C: Send, S: Send, T: Sync,

§

impl<C, T, S> Sync for CommandManifest<C, T, S>
where C: Sync, S: Sync, T: Sync,

§

impl<C, T, S> Unpin for CommandManifest<C, T, S>
where C: Unpin, S: Unpin,

§

impl<C, T, S> UnsafeUnpin for CommandManifest<C, T, S>

§

impl<C, T, S> UnwindSafe for CommandManifest<C, T, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.