Enum scrypto_test::prelude::InvokeError
source · 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 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<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)>
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> 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