Struct struct_tag::ModuleIdData
source · [−]pub struct ModuleIdData(_);
Expand description
Wrapper around ModuleId which is serialized as a string.
Implementations
sourceimpl ModuleIdData
impl ModuleIdData
sourcepub fn new(address: AccountAddress, ident: &str) -> Result<ModuleIdData, Error>
pub fn new(address: AccountAddress, ident: &str) -> Result<ModuleIdData, Error>
Creates a new ModuleIdData.
sourcepub fn address_data(&self) -> AccountAddressData
pub fn address_data(&self) -> AccountAddressData
Gets the JSON-serializable address.
Methods from Deref<Target = ModuleId>
pub fn name(&self) -> &IdentStr
pub fn address(&self) -> &AccountAddress
pub fn access_vector(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn short_str_lossless(&self) -> String
Trait Implementations
sourceimpl Clone for ModuleIdData
impl Clone for ModuleIdData
sourcefn clone(&self) -> ModuleIdData
fn clone(&self) -> ModuleIdData
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
sourceimpl Debug for ModuleIdData
impl Debug for ModuleIdData
sourceimpl Deref for ModuleIdData
impl Deref for ModuleIdData
sourceimpl<'de> Deserialize<'de> for ModuleIdData
impl<'de> Deserialize<'de> for ModuleIdData
sourcefn deserialize<D>(
deserializer: D
) -> Result<ModuleIdData, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ModuleIdData, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for ModuleIdData
impl Display for ModuleIdData
sourceimpl From<&'_ StructTagData> for ModuleIdData
impl From<&'_ StructTagData> for ModuleIdData
sourcefn from(val: &StructTagData) -> Self
fn from(val: &StructTagData) -> Self
Converts to this type from the input type.
sourceimpl From<ModuleId> for ModuleIdData
impl From<ModuleId> for ModuleIdData
sourcefn from(id: ModuleId) -> ModuleIdData
fn from(id: ModuleId) -> ModuleIdData
Converts to this type from the input type.
sourceimpl From<ModuleIdData> for ModuleId
impl From<ModuleIdData> for ModuleId
sourcefn from(id: ModuleIdData) -> ModuleId
fn from(id: ModuleIdData) -> ModuleId
Converts to this type from the input type.
sourceimpl From<ModuleIdData> for AccountAddress
impl From<ModuleIdData> for AccountAddress
sourcefn from(val: ModuleIdData) -> AccountAddress
fn from(val: ModuleIdData) -> AccountAddress
Converts to this type from the input type.
sourceimpl FromStr for ModuleIdData
impl FromStr for ModuleIdData
sourceimpl Hash for ModuleIdData
impl Hash for ModuleIdData
sourceimpl JsonSchema for ModuleIdData
impl JsonSchema for ModuleIdData
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the $ref
keyword. Read more
sourceimpl Ord for ModuleIdData
impl Ord for ModuleIdData
sourceimpl PartialEq<ModuleIdData> for ModuleIdData
impl PartialEq<ModuleIdData> for ModuleIdData
sourcefn eq(&self, other: &ModuleIdData) -> bool
fn eq(&self, other: &ModuleIdData) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ModuleIdData) -> bool
fn ne(&self, other: &ModuleIdData) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ModuleIdData> for ModuleIdData
impl PartialOrd<ModuleIdData> for ModuleIdData
sourcefn partial_cmp(&self, other: &ModuleIdData) -> Option<Ordering>
fn partial_cmp(&self, other: &ModuleIdData) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for ModuleIdData
impl Serialize for ModuleIdData
sourcefn 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 ModuleIdData
impl StructuralEq for ModuleIdData
impl StructuralPartialEq for ModuleIdData
Auto Trait Implementations
impl RefUnwindSafe for ModuleIdData
impl Send for ModuleIdData
impl Sync for ModuleIdData
impl Unpin for ModuleIdData
impl UnwindSafe for ModuleIdData
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more