[−][src]Struct contract_metadata::ContractBuilder
Builder for contract metadata
Implementations
impl ContractBuilder
[src]
pub fn name<S>(&mut self, name: S) -> &mut Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
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]
I: IntoIterator<Item = S>,
S: AsRef<str>,
Set the contract version (required)
pub fn description<S>(&mut self, description: S) -> &mut Self where
S: AsRef<str>,
[src]
S: AsRef<str>,
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]
S: AsRef<str>,
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]
fn default() -> ContractBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContractBuilder
impl Send for ContractBuilder
impl Sync for ContractBuilder
impl Unpin for ContractBuilder
impl UnwindSafe for ContractBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,