Enum Error

Source
pub enum Error {
Show 17 variants Serialize(String, ErrorBacktrace), Compression(ErrorBacktrace), EmptyOptional(String, ErrorBacktrace), KeyNotFound(String, ErrorBacktrace), KeyExists(String, ErrorBacktrace), Empty(String, ErrorBacktrace), IteratorEnd(String, ErrorBacktrace), NotImplemented(String, ErrorBacktrace), IllegalState(String, ErrorBacktrace), IllegalArgument(String, ErrorBacktrace), Unsupported(String, ErrorBacktrace), ShuttingDown, OsError(Error, String, ErrorBacktrace), Unknown(String, ErrorBacktrace), InvalidCorpus(String, ErrorBacktrace), Runtime(String, ErrorBacktrace), InvalidInput(String, ErrorBacktrace),
}
Expand description

Main error struct for LibAFL

Variants§

§

Serialize(String, ErrorBacktrace)

Serialization error

§

Compression(ErrorBacktrace)

Compression error

§

EmptyOptional(String, ErrorBacktrace)

Optional val was supposed to be set, but isn’t.

§

KeyNotFound(String, ErrorBacktrace)

Key not in Map

§

KeyExists(String, ErrorBacktrace)

Key already exists and should not overwrite

§

Empty(String, ErrorBacktrace)

No elements in the current item

§

IteratorEnd(String, ErrorBacktrace)

End of iteration

§

NotImplemented(String, ErrorBacktrace)

This is not supported (yet)

§

IllegalState(String, ErrorBacktrace)

You’re holding it wrong

§

IllegalArgument(String, ErrorBacktrace)

The argument passed to this method or function is not valid

§

Unsupported(String, ErrorBacktrace)

The performed action is not supported on the current platform

§

ShuttingDown

Shutting down, not really an error.

§

OsError(Error, String, ErrorBacktrace)

OS error, wrapping a io::Error

§

Unknown(String, ErrorBacktrace)

Something else happened

§

InvalidCorpus(String, ErrorBacktrace)

Error with the corpora

§

Runtime(String, ErrorBacktrace)

Error specific to a runtime like QEMU or Frida

§

InvalidInput(String, ErrorBacktrace)

The Input was invalid.

Implementations§

Source§

impl Error

Source

pub fn serialize<S>(arg: S) -> Self
where S: Into<String>,

Serialization error

Source

pub fn compression() -> Self

Compression error

Source

pub fn empty_optional<S>(arg: S) -> Self
where S: Into<String>,

Optional val was supposed to be set, but isn’t.

Source

pub fn invalid_input<S>(reason: S) -> Self
where S: Into<String>,

The Input was invalid

Source

pub fn key_not_found<S>(arg: S) -> Self
where S: Into<String>,

Key not in Map

Source

pub fn key_exists<S>(arg: S) -> Self
where S: Into<String>,

Key already exists in Map

Source

pub fn empty<S>(arg: S) -> Self
where S: Into<String>,

No elements in the current item

Source

pub fn iterator_end<S>(arg: S) -> Self
where S: Into<String>,

End of iteration

Source

pub fn not_implemented<S>(arg: S) -> Self
where S: Into<String>,

This is not supported (yet)

Source

pub fn illegal_state<S>(arg: S) -> Self
where S: Into<String>,

You’re holding it wrong

Source

pub fn illegal_argument<S>(arg: S) -> Self
where S: Into<String>,

The argument passed to this method or function is not valid

Source

pub fn shutting_down() -> Self

Shutting down, not really an error.

Source

pub fn unsupported<S>(arg: S) -> Self
where S: Into<String>,

This operation is not supported on the current architecture or platform

Source

pub fn os_error<S>(err: Error, msg: S) -> Self
where S: Into<String>,

OS error with additional message

Source

pub fn last_os_error<S>(msg: S) -> Self
where S: Into<String>,

OS error from io::Error::last_os_error with additional message

Source

pub fn unknown<S>(arg: S) -> Self
where S: Into<String>,

Something else happened

Source

pub fn invalid_corpus<S>(arg: S) -> Self
where S: Into<String>,

Error with corpora

Source

pub fn runtime<S>(arg: S) -> Self
where S: Into<String>,

Error specific to some runtime, like QEMU or Frida

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<BorrowError> for Error

Source§

fn from(err: BorrowError) -> Self

Converts to this type from the input type.
Source§

impl From<BorrowMutError> for Error

Source§

fn from(err: BorrowMutError) -> Self

Converts to this type from the input type.
Source§

impl From<Errno> for Error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Stringify the postcard serializer error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Create an AFL Error from io Error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Error

Source§

fn from(err: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for Error

Source§

fn from(err: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<PyErr> for Error

Source§

fn from(err: PyErr) -> Self

Converts to this type from the input type.
Source§

impl From<SetLoggerError> for Error

Source§

fn from(err: SetLoggerError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromIntError> for Error

Source§

fn from(err: TryFromIntError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for Error

Source§

fn from(err: TryFromSliceError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for Error

Source§

fn from(err: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<VarError> for Error

Source§

fn from(err: VarError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Head, T> Append<T> for Head

Source§

fn append(self, value: T) -> (Head, T)

Append Value and return the tuple
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Tail, T> Prepend<T> for Tail

Source§

fn prepend(self, value: T) -> (T, Tail)

Prepend a value to this tuple, returning a new tuple with prepended value.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Ungil for T
where T: Send,