pub enum Warning {
Country(Warning),
Currency(Warning),
DateTime(Warning),
Decode(Warning),
Duration(Warning),
FieldInvalidValue {
value: String,
message: Cow<'static, str>,
},
Money(Warning),
NoElements,
Number(Warning),
String(Warning),
Rejected,
}Expand description
The warnings that happen when reading a tariff.
Variants§
Country(Warning)
Raised while reading the tariff’s country_code.
Currency(Warning)
Raised while reading the tariff’s currency code.
DateTime(Warning)
Raised while reading a timestamp.
Decode(Warning)
Raised while decoding a JSON string’s escape sequences.
Duration(Warning)
Raised while reading a duration.
FieldInvalidValue
A field in the tariff doesn’t have the expected value.
Fields
Money(Warning)
Raised while reading a price.
NoElements
The tariff has no Elements.
Number(Warning)
Raised while reading a number.
String(Warning)
Raised while reading a string.
Rejected
Raised when build rejects a tariff object because a field the object must have is
missing, is null or has a value check can’t read. The warning sits at the
field, or at the object when the field is missing. A schema::Warning that
check returns says what is wrong with the field (see warning::Rejected).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Warning
impl Freeze for Warning
impl Move for Warning
impl RefUnwindSafe for Warningwhere
String: RefUnwindSafe,
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warningwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
impl UnwindSafe for Warning
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