[][src]Struct dangerous::Invalid

pub struct Invalid { /* fields omitted */ }

Invalid contains no details around what went wrong other than a RetryRequirement if the error is not fatal.

This is the most performant and simplistic catch-all error, but it doesn't provide any context to debug problems well.

See crate::error for additional documentation around the error system.

Example

use dangerous::Invalid;

let error: Invalid = dangerous::input(b"").read_all(|r| {
    r.read_u8()
}).unwrap_err();

assert_eq!(
    error.to_string(),
    "invalid input: needs 1 byte more to continue processing",
);

Implementations

impl Invalid[src]

pub fn fatal() -> Self[src]

Create a fatal Invalid error.

Trait Implementations

impl Clone for Invalid[src]

impl Copy for Invalid[src]

impl Debug for Invalid[src]

impl Display for Invalid[src]

impl Error for Invalid[src]

impl<'i, S> From<Expected<'i, S>> for Invalid where
    S: ContextStack
[src]

impl<'i> From<ExpectedLength<'i>> for Invalid[src]

impl<'i> From<ExpectedValid<'i>> for Invalid[src]

impl<'i> From<ExpectedValue<'i>> for Invalid[src]

impl From<Option<RetryRequirement>> for Invalid[src]

impl<'i> FromContext<'i> for Invalid[src]

impl PartialEq<Invalid> for Invalid[src]

impl StructuralPartialEq for Invalid[src]

impl ToRetryRequirement for Invalid[src]

Auto Trait Implementations

impl RefUnwindSafe for Invalid

impl Send for Invalid

impl Sync for Invalid

impl Unpin for Invalid

impl UnwindSafe for Invalid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.