[][src]Struct ethcontract_common::truffle::Artifact

pub struct Artifact {
    pub contract_name: String,
    pub abi: Abi,
    pub bytecode: Bytecode,
    pub networks: HashMap<String, Network>,
    pub devdoc: Documentation,
    pub userdoc: Documentation,
}

Represents a truffle artifact.

Fields

contract_name: String

The contract name

abi: Abi

The contract ABI

bytecode: Bytecode

The contract deployment bytecode.

networks: HashMap<String, Network>

The configured networks by network ID for the contract.

devdoc: Documentation

The developer documentation.

userdoc: Documentation

The user documentation.

Implementations

impl Artifact[src]

pub fn empty() -> Self[src]

Creates an empty artifact instance.

pub fn from_json<S>(json: S) -> Result<Self, ArtifactError> where
    S: AsRef<str>, 
[src]

Parse a truffle artifact from JSON.

pub fn load<P>(path: P) -> Result<Self, ArtifactError> where
    P: AsRef<Path>, 
[src]

Loads a truffle artifact from disk.

Trait Implementations

impl Clone for Artifact[src]

impl Debug for Artifact[src]

impl<'de> Deserialize<'de> for Artifact[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,