Struct ink_metadata::InkProject
source · pub struct InkProject { /* private fields */ }
Expand description
An entire ink! project for metadata file generation purposes.
Implementations
sourceimpl 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 layout(&self) -> &Layout<PortableForm>
pub fn layout(&self) -> &Layout<PortableForm>
Returns the storage layout of the contract.
sourcepub fn spec(&self) -> &ContractSpec<PortableForm>
pub fn spec(&self) -> &ContractSpec<PortableForm>
Returns the specification of the contract.
Trait Implementations
sourceimpl Debug for InkProject
impl Debug for InkProject
sourceimpl<'de> Deserialize<'de> for InkProject
impl<'de> Deserialize<'de> for InkProject
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 Serialize for InkProject
impl Serialize for InkProject
Auto Trait Implementations
impl RefUnwindSafe for InkProject
impl Send for InkProject
impl Sync for InkProject
impl Unpin for InkProject
impl UnwindSafe for InkProject
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