pub enum ResponseViolation {
MalformedJson,
InvalidUtf8,
MissingField {
field: &'static str,
},
InvalidField {
field: &'static str,
},
UnknownVariant {
field: &'static str,
},
IdentityMismatch {
field: &'static str,
},
ProtocolViolation {
rule: &'static str,
},
UnexpectedEnd,
LimitExceeded {
limit: usize,
},
}Expand description
A response invariant, assigned at its detection site without interpreting prose.
Field and rule labels are trusted, static schema descriptions. Implementors must never place credentials, payloads, URLs or native messages in these labels.
Variants§
MalformedJson
JSON could not be decoded into the expected response schema.
InvalidUtf8
Text bytes were not valid UTF-8.
MissingField
A required response field was absent.
InvalidField
A present response field had an invalid value.
UnknownVariant
A response discriminator was not recognized.
IdentityMismatch
Response identifiers did not agree.
ProtocolViolation
The response violated an ordering or semantic invariant.
UnexpectedEnd
A response stream ended before its terminal event.
LimitExceeded
Response data exceeded a byte limit.
Trait Implementations§
Source§impl Clone for ResponseViolation
impl Clone for ResponseViolation
impl Copy for ResponseViolation
Source§impl Debug for ResponseViolation
impl Debug for ResponseViolation
impl Eq for ResponseViolation
Source§impl PartialEq for ResponseViolation
impl PartialEq for ResponseViolation
impl StructuralPartialEq for ResponseViolation
Auto Trait Implementations§
impl Freeze for ResponseViolation
impl RefUnwindSafe for ResponseViolation
impl Send for ResponseViolation
impl Sync for ResponseViolation
impl Unpin for ResponseViolation
impl UnsafeUnpin for ResponseViolation
impl UnwindSafe for ResponseViolation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.