pub enum ObjectArg {
ImmOrOwnedObject(ObjectRef),
SharedObject {
id: ObjectId,
initial_shared_version: Version,
mutable: bool,
},
Receiving(ObjectRef),
}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(ObjectRef)
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(ObjectRef)
A Move object that can be received in this transaction.
Implementations§
Source§impl ObjectArg
impl ObjectArg
Sourcepub const CLOCK_IMM: Self
pub const CLOCK_IMM: Self
Argument for transactions acquiring an immutable reference to the network clock.
Only system transactions acquire mutable references to the clock.
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<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 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
Mutably borrows from an owned value. Read more