Struct ink_metadata::ConstructorSpec
source · [−]pub struct ConstructorSpec<F: Form = MetaForm> {
pub label: F::String,
pub selector: Selector,
pub payable: bool,
pub args: Vec<MessageParamSpec<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.
docs: Vec<F::String>
The deployment handler documentation.
Implementations
sourceimpl<F> ConstructorSpec<F>where
F: Form,
impl<F> ConstructorSpec<F>where
F: Form,
sourceimpl ConstructorSpec
impl ConstructorSpec
sourcepub fn from_label(
label: &'static str
) -> ConstructorSpecBuilder<Missing<Selector>, Missing<IsPayable>>
pub fn from_label(
label: &'static str
) -> ConstructorSpecBuilder<Missing<Selector>, Missing<IsPayable>>
Creates a new constructor spec builder.
Trait Implementations
sourceimpl<'de, F: Form> Deserialize<'de> for ConstructorSpec<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
impl<'de, F: Form> Deserialize<'de> for ConstructorSpec<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl IntoPortable for ConstructorSpec
impl IntoPortable for ConstructorSpec
type Output = ConstructorSpec<PortableForm>
type Output = ConstructorSpec<PortableForm>
The portable version of
Self
.sourcefn into_portable(self, registry: &mut Registry) -> Self::Output
fn into_portable(self, registry: &mut Registry) -> Self::Output
Convert
self
to the portable form by using the registry for caching.sourceimpl<F: PartialEq + Form> PartialEq<ConstructorSpec<F>> for ConstructorSpec<F>where
F::String: PartialEq,
F::String: PartialEq,
impl<F: PartialEq + Form> PartialEq<ConstructorSpec<F>> for ConstructorSpec<F>where
F::String: PartialEq,
F::String: PartialEq,
sourcefn eq(&self, other: &ConstructorSpec<F>) -> bool
fn eq(&self, other: &ConstructorSpec<F>) -> bool
impl<F: Eq + Form> Eq for ConstructorSpec<F>where
F::String: Eq,
F::String: Eq,
impl<F: Form> StructuralEq for ConstructorSpec<F>
impl<F: Form> StructuralPartialEq for ConstructorSpec<F>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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