pub enum Error {
ApduTooShort {
context: Box<SpanTraceWrapper>,
},
InvalidTelegramHeader {
context: Box<SpanTraceWrapper>,
},
InvalidLength {
context: Box<SpanTraceWrapper>,
},
InvalidControlFields {
context: Box<SpanTraceWrapper>,
},
InvalidControlField {
context: Box<SpanTraceWrapper>,
},
InvalidSFrameControlFields {
context: Box<SpanTraceWrapper>,
},
InvalidUFrameControlFields {
context: Box<SpanTraceWrapper>,
},
InvalidIFrameControlFields {
context: Box<SpanTraceWrapper>,
},
InvalidAsdu {
source: AsduError,
context: Box<SpanTraceWrapper>,
},
SizedSlice {
source: TryFromSliceError,
context: Box<SpanTraceWrapper>,
},
NotEnoughBytes {
context: Box<SpanTraceWrapper>,
},
Whatever {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
context: Box<SpanTraceWrapper>,
},
}Variants§
ApduTooShort
Fields
§
context: Box<SpanTraceWrapper>InvalidTelegramHeader
Fields
§
context: Box<SpanTraceWrapper>InvalidLength
Fields
§
context: Box<SpanTraceWrapper>InvalidControlFields
Fields
§
context: Box<SpanTraceWrapper>InvalidControlField
Fields
§
context: Box<SpanTraceWrapper>InvalidSFrameControlFields
Fields
§
context: Box<SpanTraceWrapper>InvalidUFrameControlFields
Fields
§
context: Box<SpanTraceWrapper>InvalidIFrameControlFields
Fields
§
context: Box<SpanTraceWrapper>InvalidAsdu
SizedSlice
NotEnoughBytes
Fields
§
context: Box<SpanTraceWrapper>Whatever
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl FromString for Error
impl FromString for Error
Source§impl IntoError<Error> for ApduTooShort
impl IntoError<Error> for ApduTooShort
Source§impl IntoError<Error> for InvalidAsdu
impl IntoError<Error> for InvalidAsdu
Source§impl IntoError<Error> for InvalidControlField
impl IntoError<Error> for InvalidControlField
Source§impl IntoError<Error> for InvalidControlFields
impl IntoError<Error> for InvalidControlFields
Source§impl IntoError<Error> for InvalidIFrameControlFields
impl IntoError<Error> for InvalidIFrameControlFields
Source§impl IntoError<Error> for InvalidLength
impl IntoError<Error> for InvalidLength
Source§impl IntoError<Error> for InvalidSFrameControlFields
impl IntoError<Error> for InvalidSFrameControlFields
Source§impl IntoError<Error> for InvalidTelegramHeader
impl IntoError<Error> for InvalidTelegramHeader
Source§impl IntoError<Error> for InvalidUFrameControlFields
impl IntoError<Error> for InvalidUFrameControlFields
Source§impl IntoError<Error> for NotEnoughBytes
impl IntoError<Error> for NotEnoughBytes
Source§impl IntoError<Error> for SizedSlice
impl IntoError<Error> for SizedSlice
Source§type Source = TryFromSliceError
type Source = TryFromSliceError
The underlying error
Source§fn into_error(self, error: Self::Source) -> Error
fn into_error(self, error: Self::Source) -> Error
Combine the information to produce the 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 UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
impl<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
Source§type Instrumented = TracedError<E>
type Instrumented = TracedError<E>
The type of the wrapped error after instrumentation
Source§fn in_current_span(self) -> <E as InstrumentError>::Instrumented
fn in_current_span(self) -> <E as InstrumentError>::Instrumented
Instrument an Error by bundling it with a SpanTrace Read more