Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 20 variants Config(String), Proxy(String), Scanner(String), Detection(String), Plugin(String), Api(String), Network(String), Tls(String), Target(String), Payload(String), Pattern(String), RateLimit(String), Threading(String), Database(String), Serialization(String), Io(Error), Json(Error), Toml(Error), Custom { context: String, message: String, }, Other(String),
}
Expand description

Historical shared error variants retained for compatibility.

Variants§

§

Config(String)

Configuration validation or loading error

§

Proxy(String)

Proxy/MITM operation failed

§

Scanner(String)

Scanner execution failed

§

Detection(String)

Vulnerability detection or analysis failed

§

Plugin(String)

Plugin loading or execution failed

§

Api(String)

API endpoint or communication error

§

Network(String)

Network operation failed

§

Tls(String)

TLS/Certificate operation failed

§

Target(String)

Target URL parsing or validation failed

§

Payload(String)

Payload generation or encoding failed

§

Pattern(String)

Pattern matching or analysis failed

§

RateLimit(String)

Rate limiting or throttling error

§

Threading(String)

Thread pool or async operation error

§

Database(String)

Database or persistence error

§

Serialization(String)

Serialization/Deserialization error

§

Io(Error)

IO operation failed (transparent source chain)

§

Json(Error)

JSON serialization failed (transparent source chain)

§

Toml(Error)

TOML serialization failed (transparent source chain)

§

Custom

Custom error with context

Fields

§context: String
§message: String
§

Other(String)

Generic error (fallback)

Implementations§

Source§

impl Error

Source

pub fn config(msg: impl Into<String>) -> Self

Creates a config error with context

Source

pub fn scanner(msg: impl Into<String>) -> Self

Creates a scanner error with context

Source

pub fn api(msg: impl Into<String>) -> Self

Creates an API error with context

Source

pub fn network(msg: impl Into<String>) -> Self

Creates a network error with context

Source

pub fn plugin(msg: impl Into<String>) -> Self

Creates a plugin error with context

Source

pub fn target(msg: impl Into<String>) -> Self

Creates a target error with context

Source

pub fn custom(context: impl Into<String>, message: impl Into<String>) -> Self

Creates a custom error with context label

Source

pub fn kind(&self) -> &'static str

Returns error kind as string (for logging, metrics)

Source

pub fn is_transient(&self) -> bool

Returns true if error is transient (can retry)

Source

pub fn is_critical(&self) -> bool

Returns true if error is critical (should stop)

Source§

impl Error

Source

pub fn proxy(msg: impl Into<String>) -> Self

Creates a proxy error

Source

pub fn detection(msg: impl Into<String>) -> Self

Creates a detection error

Source

pub fn tls(msg: impl Into<String>) -> Self

Creates a TLS error

Source

pub fn payload(msg: impl Into<String>) -> Self

Creates a payload error

Source

pub fn rate_limit(msg: impl Into<String>) -> Self

Creates a rate limit error

Source

pub fn threading(msg: impl Into<String>) -> Self

Creates a threading error

Source

pub fn database(msg: impl Into<String>) -> Self

Creates a database error

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, __formatter: &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<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin 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<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<T> Same for T

Source§

type Output = T

Should always be Self
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.