#[non_exhaustive]pub enum Reason {
Unknown,
User(String),
Log(String),
UserAndLog {
user: String,
log: String,
},
}👎Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to
poise for command handlingAvailable on crate features
framework and standard_framework only.Expand description
This type describes why a check has failed.
Note: The bot-developer is supposed to process this enum as the framework is not. It
solely serves as a way to inform a user about why a check has failed and for the developer to
log given failure (e.g. bugs or statistics) occurring in Checks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
👎Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to
poise for command handlingNo information on the failure.
User(String)
👎Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to
poise for command handlingInformation dedicated to the user.
Log(String)
👎Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to
poise for command handlingInformation purely for logging purposes.
UserAndLog
👎Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to
poise for command handlingInformation for the user but also for logging purposes.
Trait Implementations§
Source§impl Error for Reason
impl Error for Reason
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)