pub struct ID {
pub bytes: ObjectId,
}
Expand description
An object ID. This is used to reference Sui Objects.
This is not guaranteed to be globally unique–anyone can create an ID
from a UID
or
from an object, and ID’s can be freely copied and dropped.
Here, the values are not globally unique because there can be multiple values of type ID
with the same underlying bytes. For example, object::id(&obj)
can be called as many times
as you want for a given obj
, and each ID
value will be identical.
Fields§
§bytes: ObjectId
Implementations§
Source§impl ID
impl ID
pub fn move_instance( self, address: Address, module: Identifier, ) -> MoveInstance<Self>
pub fn type_(address: Address, module: Identifier) -> IDTypeTag
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ID
impl<'de> Deserialize<'de> for ID
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 MoveType for ID
impl MoveType for ID
Source§impl StaticName for ID
impl StaticName for ID
fn name() -> Identifier
Source§impl StaticTypeParams for ID
impl StaticTypeParams for ID
fn type_params() -> Vec<TypeTag>
impl Eq for ID
impl StructuralPartialEq for ID
Auto Trait Implementations§
impl Freeze for ID
impl RefUnwindSafe for ID
impl Send for ID
impl Sync for ID
impl Unpin for ID
impl UnwindSafe for ID
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<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