pub enum Error {
Context {
msg: String,
source: Box<SError>,
},
HostLang(Box<dyn HostError>),
Client {
msg: String,
bt: Backtrace,
},
Internal(Error),
}Variants§
Implementations§
Source§impl Error
impl Error
pub fn host(e: impl HostError) -> Error
pub fn client(msg: impl Into<String>) -> Error
pub fn internal(e: impl Into<Error>) -> Error
pub fn internal_msg(msg: impl Into<String>) -> Error
pub fn backtrace(&self) -> Option<&Backtrace>
pub fn without_contexts(&self) -> &Error
pub fn source(&self) -> Option<&(dyn Error + 'static)>
pub fn context<C>(self, context: C) -> Error
pub fn with_context<C, F>(self, f: F) -> Error
pub fn std_error(self) -> SError
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<AcquireError> for Error
Available on crate features server or concur_control or retryable or batching only.
impl From<AcquireError> for Error
Available on crate features
server or concur_control or retryable or batching only.Source§fn from(e: AcquireError) -> Error
fn from(e: AcquireError) -> Error
Converts to this type from the input type.
Source§impl From<DecodeError> for Error
Available on crate feature fingerprint only.
impl From<DecodeError> for Error
Available on crate feature
fingerprint only.Source§fn from(e: DecodeError) -> Error
fn from(e: DecodeError) -> Error
Converts to this type from the input type.
Source§impl From<Error> for Error
Available on crate features local-file or google-drive or azure or s3 only.
impl From<Error> for Error
Available on crate features
local-file or google-drive or azure or s3 only.Source§impl From<FingerprinterError> for Error
Available on crate feature fingerprint only.
impl From<FingerprinterError> for Error
Available on crate feature
fingerprint only.Source§fn from(e: FingerprinterError) -> Error
fn from(e: FingerprinterError) -> Error
Converts to this type from the input type.
Source§impl From<FromHexError> for Error
Available on crate feature fingerprint only.
impl From<FromHexError> for Error
Available on crate feature
fingerprint only.Source§fn from(e: FromHexError) -> Error
fn from(e: FromHexError) -> Error
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(e: FromUtf8Error) -> Error
fn from(e: FromUtf8Error) -> Error
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for Error
Available on crate features server or http or reqwest only.
impl From<InvalidHeaderValue> for Error
Available on crate features
server or http or reqwest only.Source§fn from(e: InvalidHeaderValue) -> Error
fn from(e: InvalidHeaderValue) -> Error
Converts to this type from the input type.
Source§impl From<JoinError> for Error
Available on crate features server or concur_control or retryable or batching or http only.
impl From<JoinError> for Error
Available on crate features
server or concur_control or retryable or batching or http only.Source§impl From<ParseBoolError> for Error
impl From<ParseBoolError> for Error
Source§fn from(e: ParseBoolError) -> Error
fn from(e: ParseBoolError) -> Error
Converts to this type from the input type.
Source§impl From<ParseError> for Error
Available on crate feature chrono only.
impl From<ParseError> for Error
Available on crate feature
chrono only.Source§fn from(e: ParseError) -> Error
fn from(e: ParseError) -> Error
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(e: ParseIntError) -> Error
fn from(e: ParseIntError) -> Error
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for Error
impl<T> From<PoisonError<T>> for Error
Source§fn from(e: PoisonError<T>) -> Error
fn from(e: PoisonError<T>) -> Error
Converts to this type from the input type.
Source§impl From<RecvError> for Error
Available on crate features server or concur_control or retryable or batching or http only.
impl From<RecvError> for Error
Available on crate features
server or concur_control or retryable or batching or http only.Source§impl From<RecvError> for Error
Available on crate features server or concur_control or retryable or batching only.
impl From<RecvError> for Error
Available on crate features
server or concur_control or retryable or batching only.Source§impl From<ResidualError> for Error
impl From<ResidualError> for Error
Source§fn from(e: ResidualError) -> Error
fn from(e: ResidualError) -> Error
Converts to this type from the input type.
Source§impl From<YamlSerializerError> for Error
Available on crate feature yaml only.
impl From<YamlSerializerError> for Error
Available on crate feature
yaml only.Source§fn from(e: YamlSerializerError) -> Error
fn from(e: YamlSerializerError) -> Error
Converts to this type from the input type.
Source§impl IntoResponse for Error
Available on crate feature server only.
impl IntoResponse for Error
Available on crate feature
server only.Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.