pub enum SchemaValueError {
Empty {
field: &'static str,
},
EmptyCollection {
field: &'static str,
},
InvalidRating(f32),
}Expand description
Error returned by structured-data primitive constructors.
Variants§
Empty
The supplied value was empty after trimming whitespace.
EmptyCollection
A collection required at least one item.
InvalidRating(f32)
Rating value was outside the inclusive 0.0..=5.0 range or not finite.
Trait Implementations§
Source§impl Clone for SchemaValueError
impl Clone for SchemaValueError
Source§fn clone(&self) -> SchemaValueError
fn clone(&self) -> SchemaValueError
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 Debug for SchemaValueError
impl Debug for SchemaValueError
Source§impl Display for SchemaValueError
impl Display for SchemaValueError
Source§impl Error for SchemaValueError
impl Error for SchemaValueError
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 SchemaValueError
impl PartialEq for SchemaValueError
Source§fn eq(&self, other: &SchemaValueError) -> bool
fn eq(&self, other: &SchemaValueError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SchemaValueError
impl StructuralPartialEq for SchemaValueError
Auto Trait Implementations§
impl Freeze for SchemaValueError
impl RefUnwindSafe for SchemaValueError
impl Send for SchemaValueError
impl Sync for SchemaValueError
impl Unpin for SchemaValueError
impl UnsafeUnpin for SchemaValueError
impl UnwindSafe for SchemaValueError
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