#[non_exhaustive]pub enum GTypeError<E> {
MinExceedsMax,
BelowMinimum,
AboveMaximum,
Validation(E),
}Expand description
Error returned when constructing a GType.
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.
MinExceedsMax
When minimum value exceeds maximum value.
BelowMinimum
The value is below the validator’s minimum bound.
AboveMaximum
The value is above the validator’s maximum bound.
Validation(E)
The validator rejected the value.
Trait Implementations§
Source§impl<E: Clone> Clone for GTypeError<E>
impl<E: Clone> Clone for GTypeError<E>
Source§fn clone(&self) -> GTypeError<E>
fn clone(&self) -> GTypeError<E>
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<E: Debug> Debug for GTypeError<E>
impl<E: Debug> Debug for GTypeError<E>
Source§impl<E: Display> Display for GTypeError<E>
impl<E: Display> Display for GTypeError<E>
impl<E: Eq> Eq for GTypeError<E>
Source§impl<E: Error + 'static> Error for GTypeError<E>
impl<E: Error + 'static> Error for GTypeError<E>
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<E: PartialEq> PartialEq for GTypeError<E>
impl<E: PartialEq> PartialEq for GTypeError<E>
Source§fn eq(&self, other: >ypeError<E>) -> bool
fn eq(&self, other: >ypeError<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<E> StructuralPartialEq for GTypeError<E>
Auto Trait Implementations§
impl<E> Freeze for GTypeError<E>where
E: Freeze,
impl<E> RefUnwindSafe for GTypeError<E>where
E: RefUnwindSafe,
impl<E> Send for GTypeError<E>where
E: Send,
impl<E> Sync for GTypeError<E>where
E: Sync,
impl<E> Unpin for GTypeError<E>where
E: Unpin,
impl<E> UnsafeUnpin for GTypeError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for GTypeError<E>where
E: 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