pub struct UnknownVariant {
pub type_name: &'static str,
pub value: String,
}Expand description
A string that is not one of a closed set’s wire spellings.
A wire_enum! type’s FromStr returns it.
Fields§
§type_name: &'static strThe Rust type being parsed.
value: StringThe offending input.
Trait Implementations§
Source§impl Classify for UnknownVariant
An InvalidRequest: the caller parsed a spelling no variant has. Only
FromStr builds one, on a value the caller supplies; a server frame whose
spelling does not parse is the venue’s decode error instead.
impl Classify for UnknownVariant
An InvalidRequest: the caller parsed a spelling no variant has. Only
FromStr builds one, on a value the caller supplies; a server frame whose
spelling does not parse is the venue’s decode error instead.
Source§fn is_fault(&self) -> bool
fn is_fault(&self) -> bool
Whether this error is a fault, rather than the venue answering as
designed. False only for defined outcomes, such as a Fill-And-Kill order
that matched nothing, or a venue that does not serve the caller’s
region. Alerting should key on this; retrying should not.
Source§fn retry_after(&self) -> Option<Duration>
fn retry_after(&self) -> Option<Duration>
How long the server asked the caller to wait. Defaults to the class’s
own; an error whose wait outlives its class, such as a ban that says
when it lifts, overrides it. Never
Some of zero.Source§fn is_retriable(&self) -> bool
fn is_retriable(&self) -> bool
Whether retrying could plausibly succeed, read from the class (see
Class::is_retriable).Source§impl Clone for UnknownVariant
impl Clone for UnknownVariant
Source§impl Debug for UnknownVariant
impl Debug for UnknownVariant
Source§impl Display for UnknownVariant
impl Display for UnknownVariant
impl Eq for UnknownVariant
Source§impl Error for UnknownVariant
impl Error for UnknownVariant
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 UnknownVariant
impl PartialEq for UnknownVariant
impl StructuralPartialEq for UnknownVariant
Auto Trait Implementations§
impl Freeze for UnknownVariant
impl RefUnwindSafe for UnknownVariant
impl Send for UnknownVariant
impl Sync for UnknownVariant
impl Unpin for UnknownVariant
impl UnsafeUnpin for UnknownVariant
impl UnwindSafe for UnknownVariant
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