Struct ink_metadata::ContractSpecBuilder

source ·
pub struct ContractSpecBuilder<F, S = Invalid>
where F: Form, TypeSpec<F>: Default,
{ /* private fields */ }

Implementations§

source§

impl<F> ContractSpecBuilder<F, Invalid>
where F: Form, TypeSpec<F>: Default,

source

pub fn constructors<C>(self, constructors: C) -> ContractSpecBuilder<F, Valid>
where C: IntoIterator<Item = ConstructorSpec<F>>,

Sets the constructors of the contract specification.

source§

impl<F, S> ContractSpecBuilder<F, S>
where F: Form, TypeSpec<F>: Default,

source

pub fn messages<M>(self, messages: M) -> Self
where M: IntoIterator<Item = MessageSpec<F>>,

Sets the messages of the contract specification.

source

pub fn events<E>(self, events: E) -> Self
where E: IntoIterator<Item = EventSpec<F>>,

Sets the events of the contract specification.

source

pub fn docs<D>(self, docs: D) -> Self
where D: IntoIterator<Item = <F as Form>::String>,

Sets the documentation of the contract specification.

source

pub fn lang_error(self, lang_error: TypeSpec<F>) -> Self

Sets the language error of the contract specification.

source

pub fn environment(self, environment: EnvironmentSpec<F>) -> Self

Sets the environment types of the contract specification.

source§

impl<S> ContractSpecBuilder<MetaForm, S>

source

pub fn collect_events(self) -> Self

Collect metadata for all events linked into the contract.

source§

impl<F> ContractSpecBuilder<F, Valid>
where F: Form, F::String: Display, TypeSpec<F>: Default,

source

pub fn done(self) -> ContractSpec<F>

Finalizes construction of the contract specification.

Auto Trait Implementations§

§

impl<F, S> Freeze for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: Freeze,

§

impl<F, S> RefUnwindSafe for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: RefUnwindSafe, <F as Form>::String: RefUnwindSafe,

§

impl<F, S> Send for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: Send, <F as Form>::String: Send,

§

impl<F, S> Sync for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: Sync, <F as Form>::String: Sync,

§

impl<F, S> Unpin for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: Unpin, <F as Form>::String: Unpin,

§

impl<F, S> UnwindSafe for ContractSpecBuilder<F, S>
where TypeSpec<F>: Sized, <F as Form>::Type: UnwindSafe, <F as Form>::String: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.