pub struct ConstructorSpec<F: Form = MetaForm> {
pub name: Vec<F::String>,
pub selector: Selector,
pub args: Vec<MessageParamSpec<F>>,
pub docs: Vec<F::String>,
}Expand description
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: SelectorThe selector hash of the message.
args: Vec<MessageParamSpec<F>>The parameters of the deploy handler.
docs: Vec<F::String>The deploy handler documentation.
Implementations§
Source§impl<F> ConstructorSpec<F>where
F: Form,
impl<F> ConstructorSpec<F>where
F: Form,
Source§impl ConstructorSpec
impl ConstructorSpec
Sourcepub fn from_name(
name: &'static str,
) -> ConstructorSpecBuilder<Missing<Selector>>
pub fn from_name( name: &'static str, ) -> ConstructorSpecBuilder<Missing<Selector>>
Creates a new constructor spec builder.
Sourcepub fn from_trait_and_name(
trait_name: &'static str,
constructor_name: &'static str,
) -> ConstructorSpecBuilder<Missing<Selector>>
pub fn from_trait_and_name( trait_name: &'static str, constructor_name: &'static str, ) -> ConstructorSpecBuilder<Missing<Selector>>
Creates a new constructor spec builder for a trait provided constructor.
Trait Implementations§
Source§impl<'de, F: Form> Deserialize<'de> for ConstructorSpec<F>
impl<'de, F: Form> Deserialize<'de> for ConstructorSpec<F>
Source§fn 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
Source§impl IntoPortable for ConstructorSpec
impl IntoPortable for ConstructorSpec
Source§type Output = ConstructorSpec<PortableForm>
type Output = ConstructorSpec<PortableForm>
The portable version of
Self.Source§fn 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.Source§impl<F: Form> Serialize for ConstructorSpec<F>
impl<F: Form> Serialize for ConstructorSpec<F>
impl<F: Eq + Form> Eq for ConstructorSpec<F>
impl<F: Form> StructuralPartialEq for ConstructorSpec<F>
Auto Trait Implementations§
impl<F> Freeze for ConstructorSpec<F>
impl<F> RefUnwindSafe for ConstructorSpec<F>
impl<F> Send for ConstructorSpec<F>
impl<F> Sync for ConstructorSpec<F>
impl<F> Unpin for ConstructorSpec<F>
impl<F> UnwindSafe for ConstructorSpec<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more