pub enum ObjectArg {
ImmOrOwnedObject((ObjectId, u64, ObjectDigest)),
SharedObject {
id: ObjectId,
initial_shared_version: u64,
mutable: bool,
},
Receiving((ObjectId, u64, ObjectDigest)),
}
Expand description
Object argument for a programmable transaction.
This type is here for backwards compatibility purposes; specifically to use in our programmable
transaction builder. The actual ProgrammableTransaction
does not contain this type.
Variants§
ImmOrOwnedObject((ObjectId, u64, ObjectDigest))
A Move object from fastpath.
A Move object from consensus (historically consensus objects were always shared).
SharedObject::mutable controls whether caller asks for a mutable reference to shared object.
Receiving((ObjectId, u64, ObjectDigest))
A Move object that can be received in this transaction.
Implementations§
Source§impl ObjectArg
impl ObjectArg
Sourcepub const CLOCK_IMM: ObjectArg
pub const CLOCK_IMM: ObjectArg
Argument for transactions acquiring an immutable reference to the network clock.
Only system transactions acquire mutable references to the clock.
Sourcepub const SYSTEM_STATE_IMM: ObjectArg
pub const SYSTEM_STATE_IMM: ObjectArg
Argument for transactions acquiring an immutable reference to the system state.
Sourcepub const SYSTEM_STATE_MUT: ObjectArg
pub const SYSTEM_STATE_MUT: ObjectArg
Argument for transactions acquiring a mutable reference to the system state.
pub const fn id(&self) -> ObjectId
pub const fn id_borrowed(&self) -> &ObjectId
Sourcepub fn set_mutable(
&mut self,
mutable_: bool,
) -> Result<(), ImmOwnedOrReceivingError>
pub fn set_mutable( &mut self, mutable_: bool, ) -> Result<(), ImmOwnedOrReceivingError>
For shared object arguments: set their mutable
flag value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ObjectArg
impl<'de> Deserialize<'de> for ObjectArg
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObjectArg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObjectArg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ObjectArg
impl Serialize for ObjectArg
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for ObjectArg
impl Eq for ObjectArg
impl StructuralPartialEq for ObjectArg
Auto Trait Implementations§
impl Freeze for ObjectArg
impl RefUnwindSafe for ObjectArg
impl Send for ObjectArg
impl Sync for ObjectArg
impl Unpin for ObjectArg
impl UnwindSafe for ObjectArg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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