pub struct MoveObjectType(/* private fields */);Expand description
A StructTag with optimized BCS serialization for object types.
GasCoin, StakedIota, and Coin variants use compact enum encoding instead of the full StructTag representation. The Other variant carries the full StructTag inline.
§BCS
compressed-struct-tag = other-struct-type / gas-coin-type / staked-iota-type / coin-type
other-struct-type = %x00 struct-tag
gas-coin-type = %x01
staked-iota-type = %x02
coin-type = %x03 type-tagImplementations§
Methods from Deref<Target = StructTag>§
Sourcepub fn is_same_type_as(&self, other: &StructTag) -> bool
pub fn is_same_type_as(&self, other: &StructTag) -> bool
Returns whether the type (excluding the type params) is the same as another struct tag.
Sourcepub fn is_gas_coin(&self) -> bool
pub fn is_gas_coin(&self) -> bool
Checks if this is a framework gas coin type
(0x2::coin::Coin<0x2::iota::IOTA>)
Sourcepub fn is_name(&self) -> bool
pub fn is_name(&self) -> bool
Checks if this is an IOTA-Names Name type.
Note that this does not check the package address, so it will return
true for any struct with the correct module and type name with no
type params.
Sourcepub fn is_dynamic_field(&self) -> bool
pub fn is_dynamic_field(&self) -> bool
Checks if this is a Dynamic Field type
(0x2::dynamic_field::Field<KeyType, ValueType>)
Sourcepub fn opt_coin_type(&self) -> Option<&TypeTag>
pub fn opt_coin_type(&self) -> Option<&TypeTag>
Returns the coin type if this is a Coin type, None otherwise
Sourcepub fn coin_type(&self) -> &TypeTag
pub fn coin_type(&self) -> &TypeTag
Returns the coin type of this StructTag, panics if not a coin
Sourcepub fn module(&self) -> &Identifier
pub fn module(&self) -> &Identifier
Returns the module part of a StructTag
Sourcepub fn name(&self) -> &Identifier
pub fn name(&self) -> &Identifier
Returns the name part of a StructTag
Sourcepub fn type_params(&self) -> &[TypeTag]
pub fn type_params(&self) -> &[TypeTag]
Returns the type params part of a StructTag
Sourcepub fn is_timelocked_balance(&self) -> bool
pub fn is_timelocked_balance(&self) -> bool
Checks if this is a timelocked coin balance TimeLock<Balance<T>>
Sourcepub fn is_gas_balance(&self) -> bool
pub fn is_gas_balance(&self) -> bool
Checks if this is an IOTA balance type
(0x2::balance::Balance<0x2::iota::IOTA>)
Sourcepub fn is_timelocked_gas_balance(&self) -> bool
pub fn is_timelocked_gas_balance(&self) -> bool
Checks if this is a timelocked IOTA balance type
(0x2::timelock::TimeLock<0x2::balance::Balance<0x2::iota::IOTA>>)
Sourcepub fn to_canonical_string(&self, with_prefix: bool) -> String
pub fn to_canonical_string(&self, with_prefix: bool) -> String
Returns the string representation of this struct tag using the
canonical display, with or without a 0x prefix.
pub fn is_clock(&self) -> bool
pub fn is_iota_treasury_cap(&self) -> bool
pub fn is_kiosk(&self) -> bool
pub fn is_kiosk_owner_cap(&self) -> bool
pub fn is_publisher(&self) -> bool
pub fn is_upgrade_cap(&self) -> bool
pub fn is_upgrade_ticket(&self) -> bool
pub fn is_upgrade_receipt(&self) -> bool
pub fn is_random(&self) -> bool
pub fn is_iota_system_admin_cap(&self) -> bool
pub fn is_url(&self) -> bool
pub fn is_bag(&self) -> bool
pub fn is_object_bag(&self) -> bool
pub fn is_tx_context(&self) -> bool
pub fn is_deny_list(&self) -> bool
pub fn is_transaction_deny_rules(&self) -> bool
pub fn is_package_metadata_v1(&self) -> bool
pub fn is_package_metadata_key(&self) -> bool
pub fn is_module_metadata(&self) -> bool
pub fn is_authenticator_function_ref_v1_key(&self) -> bool
pub fn is_deny_list_config_key(&self) -> bool
pub fn is_deny_list_address_key(&self) -> bool
pub fn is_deny_list_global_pause_key(&self) -> bool
pub fn is_iota_system_state(&self) -> bool
pub fn is_staked_iota(&self) -> bool
pub fn is_timelocked_staked_iota(&self) -> bool
pub fn is_system_epoch_info_event(&self) -> bool
pub fn is_unverified_validator_operation_cap(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_ascii_string(&self) -> bool
pub fn is_coin_metadata(&self) -> bool
pub fn is_treasury_cap(&self) -> bool
pub fn is_coin_manager(&self) -> bool
pub fn is_display_created(&self) -> bool
pub fn is_display_version_updated(&self) -> bool
pub fn is_coin(&self) -> bool
pub fn is_regulated_coin_metadata(&self) -> bool
pub fn is_deny_cap_v1(&self) -> bool
pub fn is_balance(&self) -> bool
pub fn is_time_lock(&self) -> bool
pub fn is_config(&self) -> bool
pub fn is_display(&self) -> bool
pub fn is_coin_manager_treasury_cap(&self) -> bool
pub fn is_coin_manager_metadata_cap(&self) -> bool
pub fn is_token(&self) -> bool
pub fn is_token_policy_cap(&self) -> bool
pub fn is_token_policy(&self) -> bool
pub fn is_transfer_policy(&self) -> bool
pub fn is_transfer_policy_cap(&self) -> bool
pub fn is_labeler_cap(&self) -> bool
pub fn is_purchase_cap(&self) -> bool
pub fn is_config_setting(&self) -> bool
pub fn is_dynamic_object_field_wrapper(&self) -> bool
pub fn is_transfer_receiving(&self) -> bool
pub fn is_option(&self) -> bool
pub fn is_alias(&self) -> bool
pub fn is_nft(&self) -> bool
pub fn is_irc27_metadata(&self) -> bool
pub fn is_basic_output(&self) -> bool
pub fn is_nft_output(&self) -> bool
pub fn is_alias_output(&self) -> bool
Trait Implementations§
Source§impl Arbitrary for MoveObjectType
Available on crate feature proptest only.
impl Arbitrary for MoveObjectType
proptest only.Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<MoveObjectType>
type Strategy = BoxedStrategy<MoveObjectType>
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl Clone for MoveObjectType
impl Clone for MoveObjectType
Source§fn clone(&self) -> MoveObjectType
fn clone(&self) -> MoveObjectType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MoveObjectType
impl Debug for MoveObjectType
Source§impl Deref for MoveObjectType
impl Deref for MoveObjectType
Source§impl<'de> Deserialize<'de> for MoveObjectType
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MoveObjectType
serde only.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>,
Source§impl Display for MoveObjectType
impl Display for MoveObjectType
impl Eq for MoveObjectType
Source§impl From<MoveObjectType> for StructTag
impl From<MoveObjectType> for StructTag
Source§fn from(obj_type: MoveObjectType) -> Self
fn from(obj_type: MoveObjectType) -> Self
Source§impl From<StructTag> for MoveObjectType
impl From<StructTag> for MoveObjectType
Source§impl FromStr for MoveObjectType
impl FromStr 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 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MoveObjectType
impl PartialEq for MoveObjectType
Source§impl PartialEq<StructTag> for MoveObjectType
impl PartialEq<StructTag> for MoveObjectType
Source§impl PartialOrd for MoveObjectType
impl PartialOrd for MoveObjectType
Source§impl Serialize for MoveObjectType
Available on crate feature serde only.
impl Serialize for MoveObjectType
serde only.