pub enum CreateMessageError {
InvalidNumber {
number: usize,
n: usize,
},
WithoutNumber {
number: usize,
n: usize,
},
EmptyPlaceholder,
}Expand description
Represents errors that can occur when working with constant messages.
This enum provides detailed error information for invalid or missing argument numbers in constant messages.
Variants§
InvalidNumber
Error indicating that an argument number is out of the allowed range.
This error occurs when an argument number is provided that is not within the valid range of 0 to N-1, where N is the number of expected arguments.
WithoutNumber
Error indicating that a required argument number is missing.
This error occurs when an expected argument number is not found within the valid range of 0 to N-1, where N is the number of expected arguments.
EmptyPlaceholder
Error indicating that a placeholder is empty.
This error occurs when a placeholder is empty. This can happen when a placeholder is found without a number.
Implementations§
Trait Implementations§
Source§impl Clone for CreateMessageError
impl Clone for CreateMessageError
Source§fn clone(&self) -> CreateMessageError
fn clone(&self) -> CreateMessageError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateMessageError
impl Debug for CreateMessageError
Source§impl Display for CreateMessageError
impl Display for CreateMessageError
Source§impl Error for CreateMessageError
impl Error for CreateMessageError
1.30.0 · Source§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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for CreateMessageError
impl PartialEq for CreateMessageError
impl Eq for CreateMessageError
impl StructuralPartialEq for CreateMessageError
Auto Trait Implementations§
impl Freeze for CreateMessageError
impl RefUnwindSafe for CreateMessageError
impl Send for CreateMessageError
impl Sync for CreateMessageError
impl Unpin for CreateMessageError
impl UnwindSafe for CreateMessageError
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