logo
pub enum ExecutableDeployItem {
    ModuleBytes {
        module_bytes: Bytes,
        args: RuntimeArgs,
    },
    StoredContractByHash {
        hash: ContractHash,
        entry_point: String,
        args: RuntimeArgs,
    },
    StoredContractByName {
        name: String,
        entry_point: String,
        args: RuntimeArgs,
    },
    StoredVersionedContractByHash {
        hash: ContractPackageHash,
        version: Option<ContractVersion>,
        entry_point: String,
        args: RuntimeArgs,
    },
    StoredVersionedContractByName {
        name: String,
        version: Option<ContractVersion>,
        entry_point: String,
        args: RuntimeArgs,
    },
    Transfer {
        args: RuntimeArgs,
    },
}
Expand description

Represents possible variants of an executable deploy.

Variants

ModuleBytes

Fields

module_bytes: Bytes

Raw WASM module bytes with assumed “call” export as an entrypoint.

args: RuntimeArgs

Runtime arguments.

Executable specified as raw bytes that represent WASM code and an instance of RuntimeArgs.

StoredContractByHash

Fields

hash: ContractHash

Contract hash.

entry_point: String

Name of an entry point.

args: RuntimeArgs

Runtime arguments.

Stored contract referenced by its ContractHash, entry point and an instance of RuntimeArgs.

StoredContractByName

Fields

name: String

Named key.

entry_point: String

Name of an entry point.

args: RuntimeArgs

Runtime arguments.

Stored contract referenced by a named key existing in the signer’s account context, entry point and an instance of RuntimeArgs.

StoredVersionedContractByHash

Fields

hash: ContractPackageHash

Contract package hash

version: Option<ContractVersion>

An optional version of the contract to call. It will default to the highest enabled version if no value is specified.

entry_point: String

Entry point name.

args: RuntimeArgs

Runtime arguments.

Stored versioned contract referenced by its ContractPackageHash, entry point and an instance of RuntimeArgs.

StoredVersionedContractByName

Fields

name: String

Named key.

version: Option<ContractVersion>

An optional version of the contract to call. It will default to the highest enabled version if no value is specified.

entry_point: String

Entry point name.

args: RuntimeArgs

Runtime arguments.

Stored versioned contract referenced by a named key existing in the signer’s account context, entry point and an instance of RuntimeArgs.

Transfer

Fields

args: RuntimeArgs

Runtime arguments.

A native transfer which does not contain or reference a WASM code.

Implementations

Returns the entry point name.

Returns the identifier of the ExecutableDeployItem.

Returns the identifier of the contract present in the deploy item, if present.

Returns the identifier of the contract package present in the deploy item, if present.

Returns the runtime arguments.

Checks if this deploy item is a native transfer.

Checks if this deploy is a standard payment.

Checks if the deploy item is a contract identified by its name.

Returns the name of the contract or contract package, if the deploy item is identified by name.

Checks if the deploy item is a stored contract.

Checks if the deploy item is a stored contract package.

Returns true if the executable deploy item is ModuleBytes.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

If true, the type has a heap size that can vary at runtime, depending on the actual value.

The amount of space a value of the type always occupies. If IS_DYNAMIC is false, this is the total amount of heap memory occupied by the value. Otherwise this is a lower bound. Read more

Estimates the size of heap memory taken up by this value. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Generate a random value of T, using rng as the source of randomness.

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Deserializes the slice into Self.

Deserializes the Vec<u8> into Self.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The name of the generated JSON Schema. Read more

Generates a JSON Schema for this type. Read more

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Serializes &self to a Vec<u8>.

Returns the length of the Vec<u8> which would be returned from a successful call to to_bytes() or into_bytes(). The data is not actually serialized, so this call is relatively cheap. Read more

Consumes self and serializes to a Vec<u8>.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Compare self to key and return true if they are equal.

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more