pub enum BotCmdResult {
Ok(Reaction),
Unauthorized,
SyntaxErr,
ArgMissing(Cow<'static, str>),
ArgMissing1To1(Cow<'static, str>),
LibErr(Error),
UserErrMsg(Cow<'static, str>),
BotErrMsg(Cow<'static, str>),
}
Variants§
Ok(Reaction)
The command was processed successfully. Pass through a Reaction
.
A user invoked the command without having sufficient authorization to do so. A reply will be sent informing the user of this.
SyntaxErr
A user invoked the command with incorrect syntax. A reply will be sent informing the user of the correct syntax.
ArgMissing(Cow<'static, str>)
A user invoked the command without providing a required argument, named by the given
string. This is a more specific version of SyntaxErr
and should be preferred where
applicable.
ArgMissing1To1(Cow<'static, str>)
A user invoked the command in one-to-one communication (a.k.a. “query” and “PM”) without
providing an argument that is required only in one-to-one communication (such as a channel
name, which could normally default to the name of the channel in which the command was
used), named by the given string. This is a more specific version of ArgMissing
and
should be preferred where applicable.
LibErr(Error)
Pass through an instance of the framework’s Error
type.
UserErrMsg(Cow<'static, str>)
A user made some miscellaneous error in invoking the command. The given string will be included in a reply informing the user of their error.
BotErrMsg(Cow<'static, str>)
A miscellaneous error that doesn’t seem to be the user’s fault occurred while the bot was processing the command. The given string will be included in a reply informing the user of this.
Trait Implementations§
Source§impl Debug for BotCmdResult
impl Debug for BotCmdResult
Auto Trait Implementations§
impl Freeze for BotCmdResult
impl !RefUnwindSafe for BotCmdResult
impl Send for BotCmdResult
impl !Sync for BotCmdResult
impl Unpin for BotCmdResult
impl !UnwindSafe for BotCmdResult
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
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>
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>
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