Struct ethers_solc::artifacts::CompilerOutput
source · [−]pub struct CompilerOutput {
pub errors: Vec<Error>,
pub sources: BTreeMap<String, SourceFile>,
pub contracts: Contracts,
}Expand description
Output type solc produces
Fields
errors: Vec<Error>sources: BTreeMap<String, SourceFile>contracts: ContractsImplementations
sourceimpl CompilerOutput
impl CompilerOutput
sourcepub fn has_warning(&self, ignored_error_codes: &[u64]) -> bool
pub fn has_warning(&self, ignored_error_codes: &[u64]) -> bool
Whether the output contains a compiler warning
sourcepub fn find(&self, contract: impl AsRef<str>) -> Option<CompactContractRef<'_>>
pub fn find(&self, contract: impl AsRef<str>) -> Option<CompactContractRef<'_>>
Finds the first contract with the given name
sourcepub fn remove(&mut self, contract: impl AsRef<str>) -> Option<Contract>
pub fn remove(&mut self, contract: impl AsRef<str>) -> Option<Contract>
Finds the first contract with the given name and removes it from the set
sourcepub fn contracts_iter(&self) -> impl Iterator<Item = (&String, &Contract)>
pub fn contracts_iter(&self) -> impl Iterator<Item = (&String, &Contract)>
Iterate over all contracts and their names
sourcepub fn contracts_into_iter(self) -> impl Iterator<Item = (String, Contract)>
pub fn contracts_into_iter(self) -> impl Iterator<Item = (String, Contract)>
Iterate over all contracts and their names
sourcepub fn get(&self, path: &str, contract: &str) -> Option<CompactContractRef<'_>>
pub fn get(&self, path: &str, contract: &str) -> Option<CompactContractRef<'_>>
Given the contract file’s path and the contract’s name, tries to return the contract’s bytecode, runtime bytecode, and abi
sourcepub fn split(self) -> (SourceFiles, OutputContracts)
pub fn split(self) -> (SourceFiles, OutputContracts)
Returns the output’s source files and contracts separately, wrapped in helper types that provide several helper methods
sourcepub fn retain_files<'a, I>(&mut self, files: I) where
I: IntoIterator<Item = &'a str>,
pub fn retain_files<'a, I>(&mut self, files: I) where
I: IntoIterator<Item = &'a str>,
Retains only those files the given iterator yields
In other words, removes all contracts for files not included in the iterator
pub fn merge(&mut self, other: CompilerOutput)
Trait Implementations
sourceimpl Clone for CompilerOutput
impl Clone for CompilerOutput
sourcefn clone(&self) -> CompilerOutput
fn clone(&self) -> CompilerOutput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for CompilerOutput
impl Debug for CompilerOutput
sourceimpl Default for CompilerOutput
impl Default for CompilerOutput
sourcefn default() -> CompilerOutput
fn default() -> CompilerOutput
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CompilerOutput
impl<'de> Deserialize<'de> for CompilerOutput
sourcefn 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
sourceimpl PartialEq<CompilerOutput> for CompilerOutput
impl PartialEq<CompilerOutput> for CompilerOutput
sourcefn eq(&self, other: &CompilerOutput) -> bool
fn eq(&self, other: &CompilerOutput) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &CompilerOutput) -> bool
fn ne(&self, other: &CompilerOutput) -> bool
This method tests for !=.
sourceimpl Serialize for CompilerOutput
impl Serialize for CompilerOutput
impl StructuralPartialEq for CompilerOutput
Auto Trait Implementations
impl RefUnwindSafe for CompilerOutput
impl Send for CompilerOutput
impl Sync for CompilerOutput
impl Unpin for CompilerOutput
impl UnwindSafe for CompilerOutput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more