pub struct WasmV1Result { /* private fields */ }
Expand description
Wasm v1 result.
Implementations§
Source§impl WasmV1Result
impl WasmV1Result
Sourcepub fn new(
limit: Gas,
consumed: Gas,
effects: Effects,
transfers: Vec<Transfer>,
messages: Messages,
error: Option<EngineError>,
ret: Option<CLValue>,
cache: Option<TrackingCopyCache>,
) -> Self
pub fn new( limit: Gas, consumed: Gas, effects: Effects, transfers: Vec<Transfer>, messages: Messages, error: Option<EngineError>, ret: Option<CLValue>, cache: Option<TrackingCopyCache>, ) -> Self
Creates a new instance.
Sourcepub fn error(&self) -> Option<&EngineError>
pub fn error(&self) -> Option<&EngineError>
Error, if any.
Sourcepub fn cache(&self) -> Option<&TrackingCopyCache>
pub fn cache(&self) -> Option<&TrackingCopyCache>
Tracking copy cache captured during execution.
Sourcepub fn root_not_found(gas_limit: Gas, state_hash: Digest) -> Self
pub fn root_not_found(gas_limit: Gas, state_hash: Digest) -> Self
Root not found.
Sourcepub fn precondition_failure(gas_limit: Gas, error: EngineError) -> Self
pub fn precondition_failure(gas_limit: Gas, error: EngineError) -> Self
Precondition failure.
Sourcepub fn invalid_executable_item(gas_limit: Gas, error: InvalidRequest) -> Self
pub fn invalid_executable_item(gas_limit: Gas, error: InvalidRequest) -> Self
Failed to transform transaction into an executable item.
Sourcepub fn has_precondition_failure(&self) -> bool
pub fn has_precondition_failure(&self) -> bool
Returns true
if this is a precondition failure.
Precondition variant is further described as an execution failure which does not have any effects, and has a gas cost of 0.
Sourcepub fn from_transfer_result(
transfer_result: TransferResult,
consumed: Gas,
) -> Option<Self>
pub fn from_transfer_result( transfer_result: TransferResult, consumed: Gas, ) -> Option<Self>
Converts a transfer result to an execution result.
Sourcepub fn balance_increased_by_amount(&self, addr: URefAddr, amount: U512) -> bool
pub fn balance_increased_by_amount(&self, addr: URefAddr, amount: U512) -> bool
Checks effects for an AddUInt512 transform to a balance at imputed addr and for exactly the imputed amount.
Trait Implementations§
Source§impl Clone for WasmV1Result
impl Clone for WasmV1Result
Source§fn clone(&self) -> WasmV1Result
fn clone(&self) -> WasmV1Result
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 moreAuto Trait Implementations§
impl Freeze for WasmV1Result
impl RefUnwindSafe for WasmV1Result
impl Send for WasmV1Result
impl Sync for WasmV1Result
impl Unpin for WasmV1Result
impl UnwindSafe for WasmV1Result
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> 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> 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