Struct ethers::solc::ProjectCompileOutput [−][src]
pub struct ProjectCompileOutput<T> where
T: ArtifactOutput, { /* fields omitted */ }
Expand description
The outcome of Project::compile
Implementations
pub fn from_unchanged(
artifacts: BTreeMap<PathBuf, <T as ArtifactOutput>::Artifact>
) -> ProjectCompileOutput<T>
pub fn from_compiler_output(
compiler_output: CompilerOutput,
ignored_error_codes: Vec<u64, Global>
) -> ProjectCompileOutput<T>
pub fn from_compiler_output_and_cache(
compiler_output: CompilerOutput,
cache: BTreeMap<PathBuf, <T as ArtifactOutput>::Artifact>,
ignored_error_codes: Vec<u64, Global>
) -> ProjectCompileOutput<T>
Get the (merged) solc compiler output
use std::collections::BTreeMap;
use ethers_solc::artifacts::Contract;
use ethers_solc::Project;
let project = Project::builder().build().unwrap();
let contracts: BTreeMap<String, Contract> =
project.compile().unwrap().output().contracts_into_iter().collect();
Combine two outputs
Whether this type does not contain compiled contracts
Whether this type has a compiler output
Whether there were errors
impl<T> ProjectCompileOutput<T> where
T: ArtifactOutput,
<T as ArtifactOutput>::Artifact: Clone,
impl<T> ProjectCompileOutput<T> where
T: ArtifactOutput,
<T as ArtifactOutput>::Artifact: Clone,
pub fn into_artifacts(
self
) -> Box<dyn Iterator<Item = (String, <T as ArtifactOutput>::Artifact)> + 'static, Global>
pub fn into_artifacts(
self
) -> Box<dyn Iterator<Item = (String, <T as ArtifactOutput>::Artifact)> + 'static, Global>
All artifacts together with their contract name
Example
use std::collections::BTreeMap;
use ethers_solc::artifacts::CompactContract;
use ethers_solc::Project;
let project = Project::builder().build().unwrap();
let contracts: BTreeMap<String, CompactContract> = project.compile().unwrap().into_artifacts().collect();
Trait Implementations
impl<T> Clone for ProjectCompileOutput<T> where
T: Clone + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Clone,
impl<T> Clone for ProjectCompileOutput<T> where
T: Clone + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Clone,
impl<T> Debug for ProjectCompileOutput<T> where
T: Debug + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Debug,
impl<T> Debug for ProjectCompileOutput<T> where
T: Debug + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Debug,
impl<T> Default for ProjectCompileOutput<T> where
T: Default + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Default,
impl<T> Default for ProjectCompileOutput<T> where
T: Default + ArtifactOutput,
<T as ArtifactOutput>::Artifact: Default,
Returns the “default value” for a type. Read more
impl<T> PartialEq<ProjectCompileOutput<T>> for ProjectCompileOutput<T> where
T: PartialEq<T> + ArtifactOutput,
<T as ArtifactOutput>::Artifact: PartialEq<<T as ArtifactOutput>::Artifact>,
impl<T> PartialEq<ProjectCompileOutput<T>> for ProjectCompileOutput<T> where
T: PartialEq<T> + ArtifactOutput,
<T as ArtifactOutput>::Artifact: PartialEq<<T as ArtifactOutput>::Artifact>,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for ProjectCompileOutput<T> where
<T as ArtifactOutput>::Artifact: RefUnwindSafe,
impl<T> Send for ProjectCompileOutput<T> where
<T as ArtifactOutput>::Artifact: Send,
impl<T> Sync for ProjectCompileOutput<T> where
<T as ArtifactOutput>::Artifact: Sync,
impl<T> Unpin for ProjectCompileOutput<T>
impl<T> UnwindSafe for ProjectCompileOutput<T> where
<T as ArtifactOutput>::Artifact: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more