pub struct UID {
pub id: ID,
}
Expand description
Globally unique IDs that define an object’s ID in storage. Any Sui Object, that is a struct
with the key
ability, must have id: UID
as its first field.
These are globally unique in the sense that no two values of type UID
are ever equal, in
other words for any two values id1: UID
and id2: UID
, id1
!= id2
.
This is a privileged type that can only be derived from a TxContext
.
UID
doesn’t have the drop
ability, so deleting a UID
requires a call to delete
.
Fields§
§id: ID
Implementations§
Source§impl UID
impl UID
pub fn move_instance( self, address: Address, module: Identifier, ) -> MoveInstance<Self>
pub fn type_(address: Address, module: Identifier) -> UIDTypeTag
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UID
impl<'de> Deserialize<'de> for UID
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 MoveStruct for UID
impl MoveStruct for UID
type StructTag = UIDTypeTag
Source§impl MoveType for UID
impl MoveType for UID
Source§impl StaticName for UID
impl StaticName for UID
fn name() -> Identifier
Source§impl StaticTypeParams for UID
impl StaticTypeParams for UID
fn type_params() -> Vec<TypeTag>
impl Eq for UID
impl StructuralPartialEq for UID
Auto Trait Implementations§
impl Freeze for UID
impl RefUnwindSafe for UID
impl Send for UID
impl Sync for UID
impl Unpin for UID
impl UnwindSafe for UID
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