Struct ink_metadata::InkProject
source · pub struct InkProject { /* private fields */ }
Expand description
An entire ink! project for metadata file generation purposes.
Implementations§
source§impl InkProject
impl InkProject
sourcepub fn new<L, S>(layout: L, spec: S) -> Selfwhere
L: Into<Layout>,
S: Into<ContractSpec>,
pub fn new<L, S>(layout: L, spec: S) -> Selfwhere
L: Into<Layout>,
S: Into<ContractSpec>,
Create a new ink! project from a layout and a spec.
sourcepub fn new_portable(
layout: Layout<PortableForm>,
spec: ContractSpec<PortableForm>,
registry: PortableRegistry
) -> Self
pub fn new_portable(
layout: Layout<PortableForm>,
spec: ContractSpec<PortableForm>,
registry: PortableRegistry
) -> Self
Create a new portable ink! project.
The caller is responsible to register all types into the supplied registry.
sourcepub fn version(&self) -> &MetadataVersion
pub fn version(&self) -> &MetadataVersion
Returns the metadata version used by the contract.
sourcepub fn registry(&self) -> &PortableRegistry
pub fn registry(&self) -> &PortableRegistry
Returns a read-only registry of types in the contract.
sourcepub fn spec(&self) -> &ContractSpec<PortableForm>
pub fn spec(&self) -> &ContractSpec<PortableForm>
Returns the specification of the contract.
Trait Implementations§
source§impl Debug for InkProject
impl Debug for InkProject
source§impl<'de> Deserialize<'de> for InkProject
impl<'de> Deserialize<'de> for InkProject
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