pub struct MoveInstance<T: MoveType> {
pub type_: T::TypeTag,
pub value: T,
}Expand description
Represents an instance of a Move type.
Both type_ and value are necessary to represent an instance since otherwise there would be
ambiguity, e.g., when the same package is published twice on-chain.
Fields§
§type_: T::TypeTag§value: TImplementations§
Source§impl<T: MoveType> MoveInstance<T>
impl<T: MoveType> MoveInstance<T>
Sourcepub fn from_raw_type(
tag: TypeTag,
bytes: &[u8],
) -> Result<Self, FromRawTypeError>
pub fn from_raw_type( tag: TypeTag, bytes: &[u8], ) -> Result<Self, FromRawTypeError>
Convenience function for constructing from raw RPC-returned general types.
Source§impl<T: MoveStruct> MoveInstance<T>
impl<T: MoveStruct> MoveInstance<T>
Sourcepub fn from_raw_struct(
stag: StructTag,
bytes: &[u8],
) -> Result<Self, FromRawStructError>
pub fn from_raw_struct( stag: StructTag, bytes: &[u8], ) -> Result<Self, FromRawStructError>
Convenience function for constructing from raw RPC-returned structs.
Trait Implementations§
Source§impl<T: Clone + MoveType> Clone for MoveInstance<T>
impl<T: Clone + MoveType> Clone for MoveInstance<T>
Source§fn clone(&self) -> MoveInstance<T>
fn clone(&self) -> MoveInstance<T>
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 moreSource§impl Display for MoveInstance<Address>
impl Display for MoveInstance<Address>
Source§impl<T: MoveStruct + Tabled> Display for MoveInstance<T>
impl<T: MoveStruct + Tabled> Display for MoveInstance<T>
Source§impl Display for MoveInstance<U256>
impl Display for MoveInstance<U256>
Source§impl Display for MoveInstance<bool>
impl Display for MoveInstance<bool>
Source§impl Display for MoveInstance<u128>
impl Display for MoveInstance<u128>
Source§impl Display for MoveInstance<u16>
impl Display for MoveInstance<u16>
Source§impl Display for MoveInstance<u32>
impl Display for MoveInstance<u32>
Source§impl Display for MoveInstance<u64>
impl Display for MoveInstance<u64>
Source§impl Display for MoveInstance<u8>
impl Display for MoveInstance<u8>
Source§impl<T: StaticTypeTag> From<T> for MoveInstance<T>
impl<T: StaticTypeTag> From<T> for MoveInstance<T>
impl<T: Eq + MoveType> Eq for MoveInstance<T>
impl<T: MoveType> StructuralPartialEq for MoveInstance<T>
Auto Trait Implementations§
impl<T> Freeze for MoveInstance<T>
impl<T> RefUnwindSafe for MoveInstance<T>
impl<T> Send for MoveInstance<T>
impl<T> Sync for MoveInstance<T>
impl<T> Unpin for MoveInstance<T>
impl<T> UnwindSafe for MoveInstance<T>
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