[−][src]Struct tract_onnx::prelude::TractError
The Error type.
This tuple struct is made of two elements:
- an
ErrorKind
which is used to determine the type of the error. - An internal
State
, not meant for direct use outside oferror_chain
internals, containing:- a backtrace, generated when the error is created.
- an error chain, used for the implementation of
Error::cause()
.
Implementations
impl TractError
[src]
pub fn from_kind(kind: TractErrorKind) -> TractError
[src]
Constructs an error from a kind, and generates a backtrace.
pub fn with_chain<E, K>(error: E, kind: K) -> TractError where
E: Error + Send + 'static,
K: Into<TractErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<TractErrorKind>,
Constructs a chained error from another error and a kind, and generates a backtrace.
pub fn with_boxed_chain<K>(
error: Box<dyn Error + 'static + Send>,
kind: K
) -> TractError where
K: Into<TractErrorKind>,
[src]
error: Box<dyn Error + 'static + Send>,
kind: K
) -> TractError where
K: Into<TractErrorKind>,
Construct a chained error from another boxed error and a kind, and generates a backtrace
pub fn kind(&self) -> &TractErrorKind
[src]
Returns the kind of the error.
pub fn iter(&self) -> Iter<'_>ⓘ
[src]
Iterates over the error chain.
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
Returns the backtrace associated with this error.
pub fn chain_err<F, EK>(self, error: F) -> TractError where
EK: Into<TractErrorKind>,
F: FnOnce() -> EK,
[src]
EK: Into<TractErrorKind>,
F: FnOnce() -> EK,
Extends the error chain with a new entry.
pub fn description(&self) -> &str
[src]
A short description of the error.
This method is identical to Error::description()
Trait Implementations
impl ChainedError for TractError
[src]
type ErrorKind = TractErrorKind
Associated kind type.
fn new(kind: TractErrorKind, state: State) -> TractError
[src]
fn from_kind(kind: <TractError as ChainedError>::ErrorKind) -> TractError
[src]
fn with_chain<E, K>(error: E, kind: K) -> TractError where
E: Error + Send + 'static,
K: Into<<TractError as ChainedError>::ErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<<TractError as ChainedError>::ErrorKind>,
fn kind(&self) -> &<TractError as ChainedError>::ErrorKind
[src]
fn iter(&self) -> Iter<'_>ⓘ
[src]
fn chain_err<F, EK>(self, error: F) -> TractError where
EK: Into<TractErrorKind>,
F: FnOnce() -> EK,
[src]
EK: Into<TractErrorKind>,
F: FnOnce() -> EK,
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn extract_backtrace(
e: &(dyn Error + 'static + Send)
) -> Option<InternalBacktrace>
[src]
e: &(dyn Error + 'static + Send)
) -> Option<InternalBacktrace>
fn display_chain(&'a self) -> DisplayChain<'a, Self>
[src]
impl Debug for TractError
[src]
impl Display for TractError
[src]
impl Error for TractError
[src]
fn description(&self) -> &str
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<'a> From<&'a str> for TractError
[src]
fn from(s: &'a str) -> TractError
[src]
impl From<Error> for TractError
[src]
fn from(e: Error) -> TractError
[src]
impl From<Infallible> for TractError
[src]
fn from(e: Infallible) -> TractError
[src]
impl From<LayoutErr> for TractError
[src]
fn from(e: LayoutErr) -> TractError
[src]
impl From<ParseIntError> for TractError
[src]
fn from(e: ParseIntError) -> TractError
[src]
impl From<ShapeError> for TractError
[src]
fn from(e: ShapeError) -> TractError
[src]
impl From<String> for TractError
[src]
fn from(s: String) -> TractError
[src]
impl From<TractError> for TractErrorKind
[src]
fn from(e: TractError) -> TractErrorKind
[src]
impl From<TractErrorKind> for TractError
[src]
fn from(e: TractErrorKind) -> TractError
[src]
impl From<Utf8Error> for TractError
[src]
fn from(e: Utf8Error) -> TractError
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TractError
impl Send for TractError
impl !Sync for TractError
impl Unpin for TractError
impl !UnwindSafe for TractError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>ⓘ
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,