Enum aptos_sdk::move_types::value::MoveStruct
[−]pub enum MoveStruct {
Runtime(Vec<MoveValue, Global>),
WithFields(Vec<(Identifier, MoveValue), Global>),
WithTypes {
type_: StructTag,
fields: 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
WithTypes
An even more decorated representation with both types and human-readable field names
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 with_types(
type_: StructTag,
fields: Vec<(Identifier, MoveValue), Global>
) -> MoveStruct
pub fn simple_deserialize(
blob: &[u8],
ty: &MoveStructLayout
) -> Result<MoveStruct, Error>
pub fn decorate(self, layout: &MoveStructLayout) -> MoveStruct
pub fn fields(&self) -> &[MoveValue]
pub fn into_fields(self) -> Vec<MoveValue, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn undecorate(self) -> MoveStruct
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 · sourcefn 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 Display for MoveStruct
impl Display 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 ==. Read more
fn ne(&self, other: &MoveStruct) -> bool
fn ne(&self, other: &MoveStruct) -> bool
This method tests for !=.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more