#[non_exhaustive]pub enum Supplied<T> {
Absent,
Decoded(T),
Undecoded,
}Expand description
What OANDA actually supplied for an optional contract field.
A provider that sent nothing, a value this client decoded, and a value this client could not decode are three different facts. Collapsing the last two into absence would report evidence OANDA did send as evidence it never sent, so a caller reconciling a rejected mutation could not tell a body it has already accounted for from a body it is missing.
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.
Absent
OANDA sent no value for this field. A body (or field) that arrived empty — only whitespace — is the same fact: nothing was sent to read.
Decoded(T)
OANDA sent a value that matched the documented shape.
Undecoded
OANDA sent a non-empty value that did not match the documented shape.
Implementations§
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Supplied<T>
Auto Trait Implementations§
impl<T> Freeze for Supplied<T>where
T: Freeze,
impl<T> RefUnwindSafe for Supplied<T>where
T: RefUnwindSafe,
impl<T> Send for Supplied<T>where
T: Send,
impl<T> Sync for Supplied<T>where
T: Sync,
impl<T> Unpin for Supplied<T>where
T: Unpin,
impl<T> UnsafeUnpin for Supplied<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Supplied<T>where
T: 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