#[non_exhaustive]pub enum GStringError<VE> {
TooShort(usize),
TooLong(usize),
NotAscii,
Validation(VE),
Mutation(&'static str),
}Expand description
GString error type.
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.
TooShort(usize)
When string is shorter than MIN=usize.
TooLong(usize)
When string is longer than MAX=usize.
NotAscii
When ASCII_ONLY is true but string is not all ASCII.
Validation(VE)
When validation failed with VE = Validator associated error type.
Mutation(&'static str)
When mutation failed with error message.
Trait Implementations§
Source§impl<VE: Clone> Clone for GStringError<VE>
impl<VE: Clone> Clone for GStringError<VE>
Source§fn clone(&self) -> GStringError<VE>
fn clone(&self) -> GStringError<VE>
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 moreSource§impl<VE: Debug> Debug for GStringError<VE>
impl<VE: Debug> Debug for GStringError<VE>
Source§impl<VE: Display + Debug> Error for GStringError<VE>
impl<VE: Display + Debug> Error for GStringError<VE>
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<VE: PartialEq> PartialEq for GStringError<VE>
impl<VE: PartialEq> PartialEq for GStringError<VE>
Source§fn eq(&self, other: &GStringError<VE>) -> bool
fn eq(&self, other: &GStringError<VE>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<VE: Copy> Copy for GStringError<VE>
impl<VE: Eq> Eq for GStringError<VE>
impl<VE> StructuralPartialEq for GStringError<VE>
Auto Trait Implementations§
impl<VE> Freeze for GStringError<VE>where
VE: Freeze,
impl<VE> RefUnwindSafe for GStringError<VE>where
VE: RefUnwindSafe,
impl<VE> Send for GStringError<VE>where
VE: Send,
impl<VE> Sync for GStringError<VE>where
VE: Sync,
impl<VE> Unpin for GStringError<VE>where
VE: Unpin,
impl<VE> UnsafeUnpin for GStringError<VE>where
VE: UnsafeUnpin,
impl<VE> UnwindSafe for GStringError<VE>where
VE: UnwindSafe,
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