pub enum Command {
MoveCall(MoveCall),
TransferObjects(TransferObjects),
SplitCoins(SplitCoins),
MergeCoins(MergeCoins),
Publish(Publish),
MakeMoveVector(MakeMoveVector),
Upgrade(Upgrade),
}
Expand description
A single command in a programmable transaction.
Variants§
MoveCall(MoveCall)
A call to either an entry or a public Move function
TransferObjects(TransferObjects)
(Vec<forall T:key+store. T>, address)
It sends n-objects to the specified address. These objects must have store
(public transfer) and either the previous owner must be an address or the object must
be newly created.
SplitCoins(SplitCoins)
(&mut Coin<T>, Vec<u64>)
-> Vec<Coin<T>>
It splits off some amounts into a new coins with those amounts
MergeCoins(MergeCoins)
(&mut Coin<T>, Vec<Coin<T>>)
It merges n-coins into the first coin
Publish(Publish)
Publishes a Move package. It takes the package bytes and a list of the package’s transitive dependencies to link against on-chain.
MakeMoveVector(MakeMoveVector)
forall T: Vec<T> -> vector<T>
Given n-values of the same type, it constructs a vector. For non objects or an empty vector,
the type tag must be specified.
Upgrade(Upgrade)
Upgrades a Move package Takes (in order):
- A vector of serialized modules for the package.
- A vector of object ids for the transitive dependencies of the new package.
- The object ID of the package being upgraded.
- An argument holding the
UpgradeTicket
that must have been produced from an earlier command in the same programmable transaction.
Trait Implementations§
source§impl Arbitrary for Command
impl Arbitrary for Command
source§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§type Strategy = BoxedStrategy<Command>
type Strategy = BoxedStrategy<Command>
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 Command
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Command
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>,
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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>,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)