pub struct Commander<Context> { /* private fields */ }Implementations§
Source§impl<Context> Commander<Context>where
Context: Context,
impl<Context> Commander<Context>where
Context: Context,
pub fn builder() -> CommanderBuilder<Context>
pub fn suggestions(&mut self) -> Vec<String>
pub fn is_unknown_command(&mut self) -> bool
pub fn set_input(&mut self, input: String)
Sourcepub fn reset_input(&mut self)
pub fn reset_input(&mut self)
Alias for Self::set_input(String::new())
pub fn execute(&mut self, context: &mut Context) -> Result<(), CommanderError>
Auto Trait Implementations§
impl<Context> Freeze for Commander<Context>
impl<Context> !RefUnwindSafe for Commander<Context>
impl<Context> !Send for Commander<Context>
impl<Context> !Sync for Commander<Context>
impl<Context> Unpin for Commander<Context>
impl<Context> !UnwindSafe for Commander<Context>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more