Enum diem_sdk::move_types::value::MoveStruct
pub enum MoveStruct {
Runtime(Vec<MoveValue, Global>),
WithFields(Vec<(Identifier, MoveValue), Global>),
}
Variants§
Runtime(Vec<MoveValue, Global>)
The representation used by the MoveVM
WithFields(Vec<(Identifier, MoveValue), Global>)
A decorated representation with human-readable field names that can be used by clients
Implementations§
§impl MoveStruct
impl MoveStruct
pub fn new(value: Vec<MoveValue, Global>) -> MoveStruct
pub fn with_fields(values: Vec<(Identifier, MoveValue), Global>) -> MoveStruct
pub fn simple_deserialize( blob: &[u8], ty: &MoveStructLayout ) -> Result<MoveStruct, Error>
pub fn fields(&self) -> &[MoveValue]
pub fn into_fields(self) -> Vec<MoveValue, Global> ⓘ
Trait Implementations§
§impl Clone for MoveStruct
impl Clone for MoveStruct
§fn clone(&self) -> MoveStruct
fn clone(&self) -> MoveStruct
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 more§impl Debug for MoveStruct
impl Debug for MoveStruct
§impl PartialEq<MoveStruct> for MoveStruct
impl PartialEq<MoveStruct> for MoveStruct
§fn eq(&self, other: &MoveStruct) -> bool
fn eq(&self, other: &MoveStruct) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for MoveStruct
impl Serialize for MoveStruct
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for MoveStruct
impl StructuralEq for MoveStruct
impl StructuralPartialEq for MoveStruct
Auto Trait Implementations§
impl RefUnwindSafe for MoveStruct
impl Send for MoveStruct
impl Sync for MoveStruct
impl Unpin for MoveStruct
impl UnwindSafe for MoveStruct
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.