Enum CommandArgumentError
#[non_exhaustive]pub enum CommandArgumentError {
Message(Box<Text>),
}Expand description
Why a custom argument’s parser refused the text a player wrote.
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.
Implementations§
§impl CommandArgumentError
impl CommandArgumentError
pub fn new(message: Text) -> CommandArgumentError
pub fn new(message: Text) -> CommandArgumentError
A refusal with the message the player sees.
Trait Implementations§
§impl Clone for CommandArgumentError
impl Clone for CommandArgumentError
§fn clone(&self) -> CommandArgumentError
fn clone(&self) -> CommandArgumentError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CommandArgumentError
impl Debug for CommandArgumentError
§impl From<(Identifier, String)> for CommandArgumentError
impl From<(Identifier, String)> for CommandArgumentError
§fn from(_: (Identifier, String)) -> CommandArgumentError
fn from(_: (Identifier, String)) -> CommandArgumentError
Converts to this type from the input type.
§impl From<CommandArgumentError> for Text
impl From<CommandArgumentError> for Text
§fn from(error: CommandArgumentError) -> Text
fn from(error: CommandArgumentError) -> Text
Converts to this type from the input type.
§impl PartialEq for CommandArgumentError
impl PartialEq for CommandArgumentError
impl StructuralPartialEq for CommandArgumentError
Auto Trait Implementations§
impl Freeze for CommandArgumentError
impl RefUnwindSafe for CommandArgumentError
impl Send for CommandArgumentError
impl Sync for CommandArgumentError
impl Unpin for CommandArgumentError
impl UnsafeUnpin for CommandArgumentError
impl UnwindSafe for CommandArgumentError
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