Struct ink_metadata::ConstructorSpecBuilder
source · [−]pub struct ConstructorSpecBuilder<Selector, IsPayable> { /* private fields */ }
Expand description
A builder for constructors.
Developer Note
Some fields are guarded by a type-state pattern to fail at compile-time instead of at run-time. This is useful to better debug code-gen macros.
Implementations
sourceimpl<P> ConstructorSpecBuilder<Missing<Selector>, P>
impl<P> ConstructorSpecBuilder<Missing<Selector>, P>
sourceimpl<S> ConstructorSpecBuilder<S, Missing<IsPayable>>
impl<S> ConstructorSpecBuilder<S, Missing<IsPayable>>
sourcepub fn payable(self, is_payable: bool) -> ConstructorSpecBuilder<S, IsPayable>
pub fn payable(self, is_payable: bool) -> ConstructorSpecBuilder<S, IsPayable>
Sets if the constructor is payable, thus accepting value for the caller.
sourceimpl<S, P> ConstructorSpecBuilder<S, P>
impl<S, P> ConstructorSpecBuilder<S, P>
sourcepub fn args<A>(self, args: A) -> Self where
A: IntoIterator<Item = MessageParamSpec>,
pub fn args<A>(self, args: A) -> Self where
A: IntoIterator<Item = MessageParamSpec>,
Sets the input arguments of the message specification.
sourcepub fn docs<D>(self, docs: D) -> Self where
D: IntoIterator<Item = &'static str>,
pub fn docs<D>(self, docs: D) -> Self where
D: IntoIterator<Item = &'static str>,
Sets the documentation of the message specification.
sourceimpl ConstructorSpecBuilder<Selector, IsPayable>
impl ConstructorSpecBuilder<Selector, IsPayable>
sourcepub fn done(self) -> ConstructorSpec
pub fn done(self) -> ConstructorSpec
Finishes construction of the constructor.
Auto Trait Implementations
impl<Selector, IsPayable> RefUnwindSafe for ConstructorSpecBuilder<Selector, IsPayable>
impl<Selector, IsPayable> Send for ConstructorSpecBuilder<Selector, IsPayable>
impl<Selector, IsPayable> Sync for ConstructorSpecBuilder<Selector, IsPayable>
impl<Selector, IsPayable> Unpin for ConstructorSpecBuilder<Selector, IsPayable>
impl<Selector, IsPayable> UnwindSafe for ConstructorSpecBuilder<Selector, IsPayable>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more