pub enum InvokeError<E>where
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> InvokeError<E>where
E: SelfError,
impl<E> InvokeError<E>where
E: SelfError,
pub fn error(error: E) -> InvokeError<E>
pub fn downstream(runtime_error: RuntimeError) -> InvokeError<E>
Trait Implementations§
Source§impl<E> Clone for InvokeError<E>
impl<E> 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<E> Debug for InvokeError<E>
impl<E> Debug for InvokeError<E>
Source§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> From<E> for InvokeError<E>where
E: SelfError,
impl<E> From<E> for InvokeError<E>where
E: SelfError,
Source§fn from(error: E) -> InvokeError<E>
fn from(error: E) -> InvokeError<E>
Converts to this type from the input type.
Source§impl From<Error> for InvokeError<WasmRuntimeError>
impl From<Error> for InvokeError<WasmRuntimeError>
Source§fn from(err: Error) -> InvokeError<WasmRuntimeError>
fn from(err: Error) -> InvokeError<WasmRuntimeError>
Converts to this type from the input type.
Source§impl<E> From<InvokeError<E>> for RuntimeErrorwhere
E: SelfError,
impl<E> From<InvokeError<E>> for RuntimeErrorwhere
E: SelfError,
Source§fn from(error: InvokeError<E>) -> RuntimeError
fn from(error: InvokeError<E>) -> RuntimeError
Converts to this type from the input type.
Source§impl<E> From<RuntimeError> for InvokeError<E>where
E: SelfError,
impl<E> From<RuntimeError> for InvokeError<E>where
E: SelfError,
Source§fn from(runtime_error: RuntimeError) -> InvokeError<E>
fn from(runtime_error: RuntimeError) -> InvokeError<E>
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more