[][src]Struct contract_metadata::ContractBuilder

pub struct ContractBuilder { /* fields omitted */ }

Builder for contract metadata

Implementations

impl ContractBuilder[src]

pub fn name<S>(&mut self, name: S) -> &mut Self where
    S: AsRef<str>, 
[src]

Set the contract name (required)

pub fn version(&mut self, version: Version) -> &mut Self[src]

Set the contract version (required)

pub fn authors<I, S>(&mut self, authors: I) -> &mut Self where
    I: IntoIterator<Item = S>,
    S: AsRef<str>, 
[src]

Set the contract version (required)

pub fn description<S>(&mut self, description: S) -> &mut Self where
    S: AsRef<str>, 
[src]

Set the contract description (optional)

pub fn documentation(&mut self, documentation: Url) -> &mut Self[src]

Set the contract documentation url (optional)

pub fn repository(&mut self, repository: Url) -> &mut Self[src]

Set the contract repository url (optional)

pub fn homepage(&mut self, homepage: Url) -> &mut Self[src]

Set the contract homepage url (optional)

pub fn license<S>(&mut self, license: S) -> &mut Self where
    S: AsRef<str>, 
[src]

Set the contract license (optional)

pub fn build(&self) -> Result<Contract, String>[src]

Finalize construction of the ContractMetadata.

Returns an Err if any required fields missing.

Trait Implementations

impl Default for ContractBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.