pub enum ObjectArg {
ImmOrOwnedObject(ObjectRef),
SharedObject {
id: Address,
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.
Sourcepub const SYSTEM_STATE_IMM: Self
pub const SYSTEM_STATE_IMM: Self
Argument for transactions acquiring an immutable reference to the system state.
Sourcepub const SYSTEM_STATE_MUT: Self
pub const SYSTEM_STATE_MUT: Self
Argument for transactions acquiring a mutable reference to the system state.
pub const fn id(&self) -> Address
pub const fn id_borrowed(&self) -> &Address
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>,
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 UnsafeUnpin 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<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
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