Struct module_id::ModuleIdData
source · [−]pub struct ModuleIdData(_);
Expand description
Wrapper around ModuleId which is serialized as a string.
Implementations
sourceimpl ModuleIdData
impl ModuleIdData
sourcepub fn address(&self) -> &AccountAddress
pub fn address(&self) -> &AccountAddress
Gets the address of the module.
sourcepub fn short_str_lossless(&self) -> String
pub fn short_str_lossless(&self) -> String
Renders the ModuleIdData as a short string.
Example
use module_id::*;
let id: ModuleIdData = module_id::parse_module_id("0x1::Errors").unwrap();
assert_eq!("0x1::Errors", id.short_str_lossless());
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<'de> Deserialize<'de> for ModuleIdData
impl<'de> Deserialize<'de> for ModuleIdData
sourcefn 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
sourceimpl Display for ModuleIdData
impl Display for ModuleIdData
sourceimpl From<&ModuleId> for ModuleIdData
impl From<&ModuleId> for ModuleIdData
sourceimpl From<&ModuleIdData> for ModuleId
impl From<&ModuleIdData> for ModuleId
sourcefn from(id: &ModuleIdData) -> Self
fn from(id: &ModuleIdData) -> Self
Converts to this type from the input type.
sourceimpl From<ModuleId> for ModuleIdData
impl From<ModuleId> for ModuleIdData
sourceimpl From<ModuleIdData> for ModuleId
impl From<ModuleIdData> for ModuleId
sourcefn from(id: ModuleIdData) -> Self
fn from(id: ModuleIdData) -> Self
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 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
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