pub enum Validation {
Auto,
Custom(String),
Disabled,
}Expand description
Validation behavior for an argument.
Controls whether the framework validates the argument before calling the handler, and what error message is shown on failure.
Variants§
Auto
Framework validates and sends a default error message.
Custom(String)
Framework validates and sends the custom error message.
Disabled
No validation — tab-completion still works, but the handler receives the raw value and manages errors itself.
Trait Implementations§
Source§impl Clone for Validation
impl Clone for Validation
Source§fn clone(&self) -> Validation
fn clone(&self) -> Validation
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 moreAuto Trait Implementations§
impl Freeze for Validation
impl RefUnwindSafe for Validation
impl Send for Validation
impl Sync for Validation
impl Unpin for Validation
impl UnsafeUnpin for Validation
impl UnwindSafe for Validation
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