#[non_exhaustive]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.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
command = command-move-call
=/ command-transfer-objects
=/ command-split-coins
=/ command-merge-coins
=/ command-publish
=/ command-make-move-vector
=/ command-upgrade
command-move-call = %x00 move-call
command-transfer-objects = %x01 transfer-objects
command-split-coins = %x02 split-coins
command-merge-coins = %x03 merge-coins
command-publish = %x04 publish
command-make-move-vector = %x05 make-move-vector
command-upgrade = %x06 upgradeVariants (Non-exhaustive)§
This enum is marked as non-exhaustive
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
UpgradeTicketthat 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
impl<'de> Deserialize<'de> for Command
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§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