pub enum ExecutionError {
WithContext {
reason: String,
},
Generic {
reason: String,
backtrace: BackTrace,
},
}Expand description
An error that can happen when syncing a device.
Variants§
WithContext
A generic error happened during execution.
The backtrace and context information should be included in the reason string.
Generic
A generic error happened during execution thrown in the Burn project.
The full context isn’t captured by the string alone.
Implementations§
Source§impl ExecutionError
impl ExecutionError
Sourcepub fn generic(reason: impl Into<String>) -> Self
pub fn generic(reason: impl Into<String>) -> Self
An error raised inside Burn, capturing where it was raised.
Capturing is cheap — a BackTrace resolves its frames only when it
is displayed — so this is the constructor to reach for by default.
Sourcepub fn with_context(reason: impl Into<String>) -> Self
pub fn with_context(reason: impl Into<String>) -> Self
An error from outside Burn, whose context the message already carries.
Trait Implementations§
Source§impl Clone for ExecutionError
impl Clone for ExecutionError
Source§impl Debug for ExecutionError
impl Debug for ExecutionError
Source§impl<'de> Deserialize<'de> for ExecutionError
impl<'de> Deserialize<'de> for ExecutionError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ExecutionError
impl Display for ExecutionError
Source§impl Error for ExecutionError
impl Error for ExecutionError
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<ExecutionError> for TensorReadError
impl From<ExecutionError> for TensorReadError
Source§fn from(source: ExecutionError) -> Self
fn from(source: ExecutionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExecutionError
impl RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl Sync for ExecutionError
impl Unpin for ExecutionError
impl UnsafeUnpin for ExecutionError
impl UnwindSafe for ExecutionError
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