pub struct ConstructorSpec<F: Form = MetaForm> {
    pub label: F::String,
    pub selector: Selector,
    pub payable: bool,
    pub args: Vec<MessageParamSpec<F>>,
    pub return_type: ReturnTypeSpec<F>,
    pub docs: Vec<F::String>,
}
Expand description

Describes a constructor of a contract.

Fields§

§label: F::String

The label of the constructor.

In case of a trait provided constructor the label is prefixed with the trait label.

§selector: Selector

The selector hash of the message.

§payable: bool

If the constructor accepts any value from the caller.

§args: Vec<MessageParamSpec<F>>

The parameters of the deployment handler.

§return_type: ReturnTypeSpec<F>

The return type of the constructor..

§docs: Vec<F::String>

The deployment handler documentation.

Implementations§

Returns the label of the constructor.

In case of a trait provided constructor the label is prefixed with the trait label.

Returns the selector hash of the constructor.

Returns if the constructor is payable by the caller.

Returns the parameters of the deployment handler.

Returns the return type of the constructor.

Returns the deployment handler documentation.

Creates a new constructor spec builder.

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
The portable version of Self.
Convert self to the portable form by using the registry for caching.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

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.