pub enum JlrsError {
Other(Box<dyn StdErr + Send + Sync + 'static>),
Exception(Exception),
RuntimeError(RuntimeError),
AllocError(AllocError),
TypeError(TypeError),
IOError(IOError),
AccessError(AccessError),
InstantiationError(InstantiationError),
ArrayLayoutError(ArrayLayoutError),
}
Expand description
All different errors.
Variants
Other(Box<dyn StdErr + Send + Sync + 'static>)
Exception(Exception)
RuntimeError(RuntimeError)
AllocError(AllocError)
TypeError(TypeError)
IOError(IOError)
AccessError(AccessError)
InstantiationError(InstantiationError)
ArrayLayoutError(ArrayLayoutError)
Implementations
sourceimpl JlrsError
impl JlrsError
sourcepub fn other<E: StdErr + 'static + Send + Sync>(reason: E) -> Self
pub fn other<E: StdErr + 'static + Send + Sync>(reason: E) -> Self
Convert an arbitrary error to JlrsError::Other
.
sourcepub fn other_error<T, E: StdErr + 'static + Send + Sync>(
reason: E
) -> Result<T, Self>
pub fn other_error<T, E: StdErr + 'static + Send + Sync>(
reason: E
) -> Result<T, Self>
Convert an arbitrary error to Err(JlrsError::Other)
.
sourcepub fn exception_error<T>(msg: String) -> Result<T, Self>
pub fn exception_error<T>(msg: String) -> Result<T, Self>
Convert an error message to Err(JlrsError::Exception)
.
Trait Implementations
sourceimpl Error for JlrsError
impl Error for JlrsError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<AccessError> for JlrsError
impl From<AccessError> for JlrsError
sourcefn from(e: AccessError) -> Self
fn from(e: AccessError) -> Self
Converts to this type from the input type.
sourceimpl From<AccessError> for Box<JlrsError>
impl From<AccessError> for Box<JlrsError>
sourcefn from(e: AccessError) -> Self
fn from(e: AccessError) -> Self
Converts to this type from the input type.
sourceimpl From<AllocError> for JlrsError
impl From<AllocError> for JlrsError
sourcefn from(e: AllocError) -> Self
fn from(e: AllocError) -> Self
Converts to this type from the input type.
sourceimpl From<AllocError> for Box<JlrsError>
impl From<AllocError> for Box<JlrsError>
sourcefn from(e: AllocError) -> Self
fn from(e: AllocError) -> Self
Converts to this type from the input type.
sourceimpl From<ArrayLayoutError> for JlrsError
impl From<ArrayLayoutError> for JlrsError
sourcefn from(e: ArrayLayoutError) -> Self
fn from(e: ArrayLayoutError) -> Self
Converts to this type from the input type.
sourceimpl From<ArrayLayoutError> for Box<JlrsError>
impl From<ArrayLayoutError> for Box<JlrsError>
sourcefn from(e: ArrayLayoutError) -> Self
fn from(e: ArrayLayoutError) -> Self
Converts to this type from the input type.
sourceimpl From<InstantiationError> for JlrsError
impl From<InstantiationError> for JlrsError
sourcefn from(e: InstantiationError) -> Self
fn from(e: InstantiationError) -> Self
Converts to this type from the input type.
sourceimpl From<InstantiationError> for Box<JlrsError>
impl From<InstantiationError> for Box<JlrsError>
sourcefn from(e: InstantiationError) -> Self
fn from(e: InstantiationError) -> Self
Converts to this type from the input type.
sourceimpl From<RuntimeError> for JlrsError
impl From<RuntimeError> for JlrsError
sourcefn from(e: RuntimeError) -> Self
fn from(e: RuntimeError) -> Self
Converts to this type from the input type.
sourceimpl From<RuntimeError> for Box<JlrsError>
impl From<RuntimeError> for Box<JlrsError>
sourcefn from(e: RuntimeError) -> Self
fn from(e: RuntimeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for JlrsError
impl Send for JlrsError
impl Sync for JlrsError
impl Unpin for JlrsError
impl !UnwindSafe for JlrsError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more