pub struct Value { /* private fields */ }Expand description
Value type returned from an [ExecutionOutcome] or receipt result. This value
can be converted into the underlying Rust datatype, or directly grab the raw
bytes associated to the value.
Implementations§
source§impl Value
impl Value
sourcepub fn json<T: DeserializeOwned>(&self) -> Result<T>
pub fn json<T: DeserializeOwned>(&self) -> Result<T>
Deserialize an instance of type T from bytes of JSON text sourced from the
execution result of this call. This conversion can fail if the structure of
the internal state does not meet up with serde::de::DeserializeOwned’s
requirements.
sourcepub fn borsh<T: BorshDeserialize>(&self) -> Result<T>
pub fn borsh<T: BorshDeserialize>(&self) -> Result<T>
Deserialize an instance of type T from bytes sourced from the execution
result. This conversion can fail if the structure of the internal state does
not meet up with borsh::BorshDeserialize’s requirements.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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> 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