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 duplicate 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)>
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<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
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.