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) -> Self
pub fn new<L, S>(layout: L, spec: S) -> Self
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 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
source§impl JsonSchema for InkProject
impl JsonSchema for InkProject
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 moreAuto Trait Implementations§
impl Freeze for InkProject
impl RefUnwindSafe for InkProject
impl Send for InkProject
impl Sync for InkProject
impl Unpin for InkProject
impl UnwindSafe for InkProject
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