pub struct MoveObjectType(/* private fields */);Expand description
Wrapper around StructTag with a space-efficient representation for common types like coins.
The StructTag for a gas coin is 84 bytes, so using 1 byte instead is a win.
Implementations§
Source§impl MoveObjectType
impl MoveObjectType
Sourcepub const fn is_gas_coin(&self) -> bool
pub const fn is_gas_coin(&self) -> bool
Return true if self is 0x2::coin::Coin<0x2::sui::SUI>
Trait Implementations§
Source§impl Clone for MoveObjectType
impl Clone for MoveObjectType
Source§fn clone(&self) -> MoveObjectType
fn clone(&self) -> MoveObjectType
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 Debug for MoveObjectType
impl Debug for MoveObjectType
Source§impl<'de> Deserialize<'de> for MoveObjectType
impl<'de> Deserialize<'de> for MoveObjectType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MoveObjectType
impl Display for MoveObjectType
Source§impl From<MoveObjectType> for StructTag
impl From<MoveObjectType> for StructTag
Source§fn from(t: MoveObjectType) -> Self
fn from(t: MoveObjectType) -> Self
Converts to this type from the input type.
Source§impl From<MoveObjectType> for TypeTag
impl From<MoveObjectType> for TypeTag
Source§fn from(o: MoveObjectType) -> Self
fn from(o: MoveObjectType) -> Self
Converts to this type from the input type.
Source§impl From<StructTag> for MoveObjectType
impl From<StructTag> for MoveObjectType
Source§impl Hash for MoveObjectType
impl Hash for MoveObjectType
Source§impl Ord for MoveObjectType
impl Ord for MoveObjectType
Source§fn cmp(&self, other: &MoveObjectType) -> Ordering
fn cmp(&self, other: &MoveObjectType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MoveObjectType
impl PartialEq for MoveObjectType
Source§impl PartialOrd for MoveObjectType
impl PartialOrd for MoveObjectType
Source§impl Serialize for MoveObjectType
impl Serialize for MoveObjectType
impl Eq for MoveObjectType
impl StructuralPartialEq for MoveObjectType
Auto Trait Implementations§
impl !Freeze for MoveObjectType
impl RefUnwindSafe for MoveObjectType
impl Send for MoveObjectType
impl Sync for MoveObjectType
impl Unpin for MoveObjectType
impl UnwindSafe for MoveObjectType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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