pub enum Error {
Request(Error),
ResponseParse(&'static str),
TokenParse,
DomainParse,
Regex(Error),
HeaderValue(InvalidHeaderValue),
Json(Error),
}Expand description
Errors that can occur during GuerrillaMail operations.
Most errors originate either from HTTP failures (reqwest),
malformed or unexpected responses from GuerrillaMail,
or missing data required to continue an operation.
Variants§
Request(Error)
An HTTP request failed.
This includes network connectivity issues, TLS errors, timeouts, and non-success HTTP status codes returned by the GuerrillaMail service.
ResponseParse(&'static str)
Response was received but did not match the expected shape/content.
Use this for “missing field”, “unexpected type”, or “schema changed” cases.
TokenParse
Failed to parse the API token from the GuerrillaMail homepage.
This error typically occurs during client construction when
the expected api_token JavaScript variable cannot be found
or does not match the expected format.
DomainParse
Failed to parse the available domain list from the GuerrillaMail page.
This indicates that the service response structure may have changed or did not include the expected domain information.
Regex(Error)
Failed to build or parse a regex used by the client.
HeaderValue(InvalidHeaderValue)
Failed to construct an HTTP header value.
Json(Error)
Failed to deserialize JSON returned by the GuerrillaMail API.
This usually indicates an unexpected response schema or a partially returned / malformed payload.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
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> 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.