pub struct Object { /* private fields */ }
Expand description
An object on the sui blockchain
§BCS
The BCS serialized form for this type is defined by the following ABNF:
object = object-data owner digest u64
Implementations§
Source§impl Object
impl Object
Sourcepub fn new(
data: ObjectData,
owner: Owner,
previous_transaction: TransactionDigest,
storage_rebate: u64,
) -> Self
pub fn new( data: ObjectData, owner: Owner, previous_transaction: TransactionDigest, storage_rebate: u64, ) -> Self
Build an object
Sourcepub fn object_type(&self) -> ObjectType
pub fn object_type(&self) -> ObjectType
Return this object’s type
Sourcepub fn as_struct(&self) -> Option<&MoveStruct>
pub fn as_struct(&self) -> Option<&MoveStruct>
Try to interpret this object as a move struct
Sourcepub fn data(&self) -> &ObjectData
pub fn data(&self) -> &ObjectData
Return this object’s data
Sourcepub fn previous_transaction(&self) -> TransactionDigest
pub fn previous_transaction(&self) -> TransactionDigest
Return the digest of the transaction that last modified this object
Sourcepub fn storage_rebate(&self) -> u64
pub fn storage_rebate(&self) -> u64
Return the storage rebate locked in this object
Storage rebates are credited to the gas coin used in a transaction that deletes this object.
Trait Implementations§
Source§impl Arbitrary for Object
impl Arbitrary for Object
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<Object>
type Strategy = BoxedStrategy<Object>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for Object
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Object
Available on crate feature
serde
only.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
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moreSource§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