pub struct Error { /* private fields */ }Implementations§
Source§impl Error
impl Error
pub fn new<T: Display>(kind: ErrorKind, message: T) -> Self
pub fn new0(kind: ErrorKind) -> Self
pub fn newc(kind: ErrorKind, message: Option<impl Display>) -> Self
pub fn code(&self) -> i16
pub fn e<T: Display>(kind: ErrorKind, message: T) -> Self
pub fn not_found<T: Display>(message: T) -> Self
pub fn not_ready<T: Display>(message: T) -> Self
pub fn unsupported<T: Display>(message: T) -> Self
pub fn registry<T: Display>(message: T) -> Self
pub fn busy<T: Display>(message: T) -> Self
pub fn core<T: Display>(message: T) -> Self
pub fn io<T: Display>(message: T) -> Self
pub fn duplicate<T: Display>(message: T) -> Self
pub fn failed<T: Display>(message: T) -> Self
pub fn access<T: Display>(message: T) -> Self
pub fn access_more_data_required<T: Display>(message: T) -> Self
pub fn timeout() -> Self
pub fn aborted() -> Self
pub fn invalid_data<T: Display>(message: T) -> Self
pub fn invalid_params<T: Display>(message: T) -> Self
pub fn not_implemented<T: Display>(message: T) -> Self
pub fn kind(&self) -> ErrorKind
pub fn message(&self) -> Option<&str>
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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<DeserializerError> for Error
impl From<DeserializerError> for Error
Source§fn from(err: DeserializerError) -> Error
fn from(err: DeserializerError) -> Error
Converts to this type from the input type.
Source§impl From<Elapsed> for Error
Available on crate features services or workers or extended-value only.
impl From<Elapsed> for Error
Available on crate features
services or workers or extended-value only.Source§impl From<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(err: FromHexError) -> Error
fn from(err: FromHexError) -> Error
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(err: FromUtf8Error) -> Error
fn from(err: FromUtf8Error) -> Error
Converts to this type from the input type.
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(_err: Infallible) -> Error
fn from(_err: Infallible) -> Error
Converts to this type from the input type.
Source§impl From<IpNetworkError> for Error
impl From<IpNetworkError> for Error
Source§fn from(err: IpNetworkError) -> Error
fn from(err: IpNetworkError) -> Error
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseFloatError> for Error
impl From<ParseFloatError> for Error
Source§fn from(err: ParseFloatError) -> Error
fn from(err: ParseFloatError) -> Error
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(err: ParseIntError) -> Error
fn from(err: ParseIntError) -> Error
Converts to this type from the input type.
Source§impl From<SerializerError> for Error
impl From<SerializerError> for Error
Source§fn from(err: SerializerError) -> Error
fn from(err: SerializerError) -> Error
Converts to this type from the input type.
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(err: TryFromIntError) -> Error
fn from(err: TryFromIntError) -> Error
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(err: TryFromSliceError) -> Error
fn from(err: TryFromSliceError) -> Error
Converts to this type from the input type.
Source§impl From<TryLockError> for Error
impl From<TryLockError> for Error
Source§fn from(err: TryLockError) -> Error
fn from(err: TryLockError) -> Error
Converts to this type from the input type.
impl Eq for Error
impl StructuralPartialEq for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> Pointable for T
impl<T> Pointable for T
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.