Enum radix_engine::errors::InvokeError
source · pub enum InvokeError<E: SelfError> {
SelfError(E),
Downstream(RuntimeError),
}
Expand description
This enum is to help with designing intuitive error abstractions.
Each engine module can have its own SelfError
, but can also wrap arbitrary downstream errors.
Ultimately these errors get flattened out to a RuntimeError
anyway.
Variants§
SelfError(E)
Downstream(RuntimeError)
Implementations§
source§impl<E: SelfError> InvokeError<E>
impl<E: SelfError> InvokeError<E>
pub fn error(error: E) -> Self
pub fn downstream(runtime_error: RuntimeError) -> Self
Trait Implementations§
source§impl<E: Clone + SelfError> Clone for InvokeError<E>
impl<E: Clone + SelfError> Clone for InvokeError<E>
source§fn clone(&self) -> InvokeError<E>
fn clone(&self) -> InvokeError<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Display for InvokeError<WasmRuntimeError>
impl Display for InvokeError<WasmRuntimeError>
source§impl Error for InvokeError<WasmRuntimeError>
impl Error for InvokeError<WasmRuntimeError>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<E: SelfError> From<E> for InvokeError<E>
impl<E: SelfError> From<E> for InvokeError<E>
source§impl From<Error> for InvokeError<WasmRuntimeError>
impl From<Error> for InvokeError<WasmRuntimeError>
source§impl<E: SelfError> From<InvokeError<E>> for RuntimeError
impl<E: SelfError> From<InvokeError<E>> for RuntimeError
source§fn from(error: InvokeError<E>) -> Self
fn from(error: InvokeError<E>) -> Self
Converts to this type from the input type.
source§impl<E: SelfError> From<RuntimeError> for InvokeError<E>
impl<E: SelfError> From<RuntimeError> for InvokeError<E>
source§fn from(runtime_error: RuntimeError) -> Self
fn from(runtime_error: RuntimeError) -> Self
Converts to this type from the input type.
impl HostError for InvokeError<WasmRuntimeError>
Auto Trait Implementations§
impl<E> Freeze for InvokeError<E>where
E: Freeze,
impl<E> RefUnwindSafe for InvokeError<E>where
E: RefUnwindSafe,
impl<E> Send for InvokeError<E>where
E: Send,
impl<E> Sync for InvokeError<E>where
E: Sync,
impl<E> Unpin for InvokeError<E>where
E: Unpin,
impl<E> UnwindSafe for InvokeError<E>where
E: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.