pub struct VMOutcome {
pub balance: Balance,
pub storage_usage: StorageUsage,
pub return_data: ReturnData,
pub burnt_gas: Gas,
pub used_gas: Gas,
pub compute_usage: Compute,
pub logs: Vec<String>,
pub profile: ProfileDataV3,
pub aborted: Option<FunctionCallError>,
}
Fields§
§balance: Balance
§storage_usage: StorageUsage
§return_data: ReturnData
§burnt_gas: Gas
§used_gas: Gas
§compute_usage: Compute
§logs: Vec<String>
§profile: ProfileDataV3
Data collected from making a contract call
aborted: Option<FunctionCallError>
Implementations§
Source§impl VMOutcome
impl VMOutcome
Sourcepub fn abort(logic: VMLogic<'_>, error: FunctionCallError) -> VMOutcome
pub fn abort(logic: VMLogic<'_>, error: FunctionCallError) -> VMOutcome
Consumes the VMLogic
object and computes the final outcome with the
given error that stopped execution from finishing successfully.
Sourcepub fn ok(logic: VMLogic<'_>) -> VMOutcome
pub fn ok(logic: VMLogic<'_>) -> VMOutcome
Consumes the VMLogic
object and computes the final outcome for a
successful execution.
Sourcepub fn nop_outcome(error: FunctionCallError) -> VMOutcome
pub fn nop_outcome(error: FunctionCallError) -> VMOutcome
Creates an outcome with a no-op outcome.
Sourcepub fn abort_but_nop_outcome_in_old_protocol(
logic: VMLogic<'_>,
error: FunctionCallError,
) -> VMOutcome
pub fn abort_but_nop_outcome_in_old_protocol( logic: VMLogic<'_>, error: FunctionCallError, ) -> VMOutcome
Like Self::abort()
but without feature FixContractLoadingCost
it
will return a NOP outcome. This is used for backwards-compatibility only.
Trait Implementations§
impl StructuralPartialEq for VMOutcome
Auto Trait Implementations§
impl Freeze for VMOutcome
impl RefUnwindSafe for VMOutcome
impl Send for VMOutcome
impl Sync for VMOutcome
impl Unpin for VMOutcome
impl UnwindSafe for VMOutcome
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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