Skip to main content

EntrypointArgument

Trait EntrypointArgument 

Source
pub trait EntrypointArgument: Sized {
    // Required methods
    fn is_required() -> bool;
    fn cl_type() -> CLType;
    fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs);
    fn unwrap(value: Option<Self>, env: &ContractEnv) -> Self;
}
Expand description

A trait for types that can be used as entrypoint arguments.

Required Methods§

Source

fn is_required() -> bool

Returns true if the argument is required.

Source

fn cl_type() -> CLType

Returns the CLType of the argument.

Source

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.

Source

fn unwrap(value: Option<Self>, env: &ContractEnv) -> Self

Unwraps the argument from an Option.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§