Enum oasis_runtime_sdk::module::CallResult
source · pub enum CallResult {
Ok(Value),
Failed {
module: String,
code: u32,
message: String,
},
Aborted(Error),
}
Expand description
A variant of types::transaction::CallResult
but used for dispatch purposes so the dispatch
process can use a different representation.
Specifically, this type is not serializable.
Variants§
Ok(Value)
Call has completed successfully.
Failed
Call has completed with failure.
Aborted(Error)
A fatal error has occurred and the batch must be aborted.
Implementations§
source§impl CallResult
impl CallResult
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check whether the call result indicates a successful operation or not.
pub fn unwrap(self) -> Value
Trait Implementations§
source§impl Debug for CallResult
impl Debug for CallResult
source§impl From<CallResult> for CallResult
impl From<CallResult> for CallResult
source§fn from(v: CallResult) -> Self
fn from(v: CallResult) -> Self
Converts to this type from the input type.
source§impl From<CallResult> for DispatchResult
impl From<CallResult> for DispatchResult
source§fn from(result: CallResult) -> Self
fn from(result: CallResult) -> Self
Converts to this type from the input type.
source§impl TryFrom<CallResult> for TxSimulationFailure
impl TryFrom<CallResult> for TxSimulationFailure
Auto Trait Implementations§
impl RefUnwindSafe for CallResult
impl Send for CallResult
impl Sync for CallResult
impl Unpin for CallResult
impl UnwindSafe for CallResult
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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