[][src]Struct ink_metadata::ConstructorSpec

pub struct ConstructorSpec<F: Form = MetaForm> {
    pub name: Vec<F::String>,
    pub selector: Selector,
    pub args: Vec<MessageParamSpec<F>>,
    pub docs: Vec<F::String>,
}

Describes a constructor of a contract.

Fields

name: Vec<F::String>

The name of the message.

In case of a trait provided constructor the trait name is prefixed.

selector: Selector

The selector hash of the message.

args: Vec<MessageParamSpec<F>>

The parameters of the deploy handler.

docs: Vec<F::String>

The deploy handler documentation.

Implementations

impl<F> ConstructorSpec<F> where
    F: Form
[src]

pub fn name(&self) -> &[F::String][src]

Returns the name of the message.

In case of a trait provided constructor the trait name is prefixed.

pub fn selector(&self) -> &Selector[src]

Returns the selector hash of the message.

pub fn args(&self) -> &[MessageParamSpec<F>][src]

Returns the parameters of the deploy handler.

pub fn docs(&self) -> &[F::String][src]

Returns the deploy handler documentation.

impl ConstructorSpec[src]

pub fn from_name(
    name: &'static str
) -> ConstructorSpecBuilder<Missing<Selector>>
[src]

Creates a new constructor spec builder.

pub fn from_trait_and_name(
    trait_name: &'static str,
    constructor_name: &'static str
) -> ConstructorSpecBuilder<Missing<Selector>>
[src]

Creates a new constructor spec builder for a trait provided constructor.

Trait Implementations

impl<F: Debug + Form> Debug for ConstructorSpec<F> where
    F::String: Debug,
    F::String: Debug
[src]

impl<'de, F: Form> Deserialize<'de> for ConstructorSpec<F> where
    F::Type: DeserializeOwned,
    F::String: DeserializeOwned
[src]

impl<F: Eq + Form> Eq for ConstructorSpec<F> where
    F::String: Eq,
    F::String: Eq
[src]

impl IntoCompact for ConstructorSpec[src]

type Output = ConstructorSpec<CompactForm>

The compact version of Self.

impl<F: PartialEq + Form> PartialEq<ConstructorSpec<F>> for ConstructorSpec<F> where
    F::String: PartialEq,
    F::String: PartialEq
[src]

impl<F: Form> Serialize for ConstructorSpec<F> where
    F::Type: Serialize,
    F::String: Serialize
[src]

impl<F: Form> StructuralEq for ConstructorSpec<F>[src]

impl<F: Form> StructuralPartialEq for ConstructorSpec<F>[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for ConstructorSpec<F> where
    <F as Form>::String: RefUnwindSafe,
    <F as Form>::Type: RefUnwindSafe

impl<F> Send for ConstructorSpec<F> where
    <F as Form>::String: Send,
    <F as Form>::Type: Send

impl<F> Sync for ConstructorSpec<F> where
    <F as Form>::String: Sync,
    <F as Form>::Type: Sync

impl<F> Unpin for ConstructorSpec<F> where
    <F as Form>::String: Unpin,
    <F as Form>::Type: Unpin

impl<F> UnwindSafe for ConstructorSpec<F> where
    <F as Form>::String: UnwindSafe,
    <F as Form>::Type: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.