Struct ink_metadata::ContractSpec
source · pub struct ContractSpec<F: Form = MetaForm>{ /* private fields */ }
Expand description
Describes a contract.
Implementations§
source§impl<F> ContractSpec<F>
impl<F> ContractSpec<F>
sourcepub fn constructors(&self) -> &[ConstructorSpec<F>]
pub fn constructors(&self) -> &[ConstructorSpec<F>]
Returns the set of constructors of the contract.
sourcepub fn messages(&self) -> &[MessageSpec<F>]
pub fn messages(&self) -> &[MessageSpec<F>]
Returns the external messages of the contract.
sourcepub fn lang_error(&self) -> &TypeSpec<F>
pub fn lang_error(&self) -> &TypeSpec<F>
Returns the language error type.
pub fn environment(&self) -> &EnvironmentSpec<F>
source§impl<F> ContractSpec<F>
impl<F> ContractSpec<F>
sourcepub fn new() -> ContractSpecBuilder<F, Invalid>
pub fn new() -> ContractSpecBuilder<F, Invalid>
Creates a new contract specification.
Trait Implementations§
source§impl<F: Debug + Form> Debug for ContractSpec<F>
impl<F: Debug + Form> Debug for ContractSpec<F>
source§impl<'de, F: Form> Deserialize<'de> for ContractSpec<F>
impl<'de, F: Form> Deserialize<'de> for ContractSpec<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 ContractSpec
impl IntoPortable for ContractSpec
§type Output = ContractSpec<PortableForm>
type Output = ContractSpec<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 + JsonSchema> JsonSchema for ContractSpec<F>
impl<F: Form + JsonSchema> JsonSchema for ContractSpec<F>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl<F: PartialEq + Form> PartialEq for ContractSpec<F>
impl<F: PartialEq + Form> PartialEq for ContractSpec<F>
source§fn eq(&self, other: &ContractSpec<F>) -> bool
fn eq(&self, other: &ContractSpec<F>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<F: Form> Serialize for ContractSpec<F>
impl<F: Form> Serialize for ContractSpec<F>
impl<F: Eq + Form> Eq for ContractSpec<F>
impl<F: Form> StructuralPartialEq for ContractSpec<F>
Auto Trait Implementations§
impl<F> Freeze for ContractSpec<F>
impl<F> RefUnwindSafe for ContractSpec<F>
impl<F> Send for ContractSpec<F>
impl<F> Sync for ContractSpec<F>
impl<F> Unpin for ContractSpec<F>
impl<F> UnwindSafe for ContractSpec<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