[−][src]Struct dangerous::Invalid
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]
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]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<'i, S> From<Expected<'i, S>> for Invalid where
S: ContextStack,
[src]
S: ContextStack,
impl<'i> From<ExpectedLength<'i>> for Invalid
[src]
fn from(err: ExpectedLength<'i>) -> Self
[src]
impl<'i> From<ExpectedValid<'i>> for Invalid
[src]
fn from(err: ExpectedValid<'i>) -> Self
[src]
impl<'i> From<ExpectedValue<'i>> for Invalid
[src]
fn from(err: ExpectedValue<'i>) -> Self
[src]
impl From<Option<RetryRequirement>> for Invalid
[src]
fn from(retry_requirement: Option<RetryRequirement>) -> Self
[src]
impl<'i> FromContext<'i> for Invalid
[src]
fn from_context<C>(self, _input: &'i Input, _context: C) -> Self where
C: Context,
[src]
C: Context,
impl PartialEq<Invalid> for Invalid
[src]
impl StructuralPartialEq for Invalid
[src]
impl ToRetryRequirement for Invalid
[src]
fn to_retry_requirement(&self) -> Option<RetryRequirement>
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,