pub enum ObjectType {
Package,
Struct(StructTag),
}Expand description
Type of an IOTA object
Variants§
Package
Move package containing one or more bytecode modules
Struct(StructTag)
A Move struct of the given type
Implementations§
Source§impl ObjectType
impl ObjectType
Sourcepub fn is_package(&self) -> bool
pub fn is_package(&self) -> bool
Checks if this is a package variant.
Sourcepub fn as_struct(&self) -> &StructTag
pub fn as_struct(&self) -> &StructTag
Converts this into a struct if it is a struct variant, or panics otherwise.
Sourcepub fn as_mut_struct(&mut self) -> &mut StructTag
pub fn as_mut_struct(&mut self) -> &mut StructTag
Converts this into a mut struct if it is a struct variant, or panics otherwise.
Sourcepub fn as_opt_struct(&self) -> Option<&StructTag>
pub fn as_opt_struct(&self) -> Option<&StructTag>
Converts this into a struct if it is a struct variant, or returns None otherwise.
Sourcepub fn as_opt_mut_struct(&mut self) -> Option<&mut StructTag>
pub fn as_opt_mut_struct(&mut self) -> Option<&mut StructTag>
Converts this into a mut struct if it is a struct variant, or returns None otherwise.
Sourcepub fn into_opt_struct(self) -> Option<StructTag>
pub fn into_opt_struct(self) -> Option<StructTag>
Converts this into a struct if it is a struct variant, or returns None otherwise.
Sourcepub fn into_struct(self) -> StructTag
pub fn into_struct(self) -> StructTag
Converts this into a struct if it is a struct variant, or panics otherwise.
Trait Implementations§
Source§impl Clone for ObjectType
impl Clone for ObjectType
Source§fn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ObjectType
impl Debug for ObjectType
Source§impl Display for ObjectType
impl Display for ObjectType
impl Eq for ObjectType
Source§impl Ord for ObjectType
impl Ord for ObjectType
Source§fn cmp(&self, other: &ObjectType) -> Ordering
fn cmp(&self, other: &ObjectType) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
Source§impl PartialOrd for ObjectType
impl PartialOrd for ObjectType
impl StructuralPartialEq for ObjectType
Auto Trait Implementations§
impl !Freeze for ObjectType
impl RefUnwindSafe for ObjectType
impl Send for ObjectType
impl Sync for ObjectType
impl Unpin for ObjectType
impl UnsafeUnpin for ObjectType
impl UnwindSafe for ObjectType
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