pub struct Violation {
pub code: &'static str,
pub detail: String,
}Expand description
Untrusted input broke a wire invariant.
code mirrors the reference implementation’s ProtocolViolation.code, so
the cross-language vectors can assert on it.
Fields§
§code: &'static strStable machine-readable code, e.g. frame-oversized.
detail: StringHuman-readable detail. Never contains the session token.
Trait Implementations§
impl Eq for Violation
Source§impl Error for Violation
impl Error for Violation
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()
impl StructuralPartialEq for Violation
Auto Trait Implementations§
impl Freeze for Violation
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnsafeUnpin for Violation
impl UnwindSafe for Violation
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