Struct ethers_solc::Artifacts
source · [−]pub struct Artifacts<T>(pub FileToContractsMap<Vec<ArtifactFile<T>>>);Expand description
Represents a set of Artifacts
Tuple Fields
0: FileToContractsMap<Vec<ArtifactFile<T>>>Implementations
sourceimpl<T> Artifacts<T>
impl<T> Artifacts<T>
pub fn into_inner(self) -> FileToContractsMap<Vec<ArtifactFile<T>>>
sourcepub fn join_all(&mut self, root: impl AsRef<Path>) -> &mut Self
pub fn join_all(&mut self, root: impl AsRef<Path>) -> &mut Self
Sets the artifact files location to root adjoined to self.file.
sourcepub fn strip_prefix_all(&mut self, base: impl AsRef<Path>) -> &mut Self
pub fn strip_prefix_all(&mut self, base: impl AsRef<Path>) -> &mut Self
Removes base from all artifacts
sourcepub fn has_contract_artifact(
&self,
contract_name: &str,
artifact_path: &Path
) -> bool
pub fn has_contract_artifact(
&self,
contract_name: &str,
artifact_path: &Path
) -> bool
Returns true if this type contains an artifact with the given path for the given contract
sourcepub fn has_artifact(&self, artifact_path: &Path) -> bool
pub fn has_artifact(&self, artifact_path: &Path) -> bool
Returns true if this type contains an artifact with the given path
sourcepub fn artifact_files(&self) -> impl Iterator<Item = &ArtifactFile<T>>
pub fn artifact_files(&self) -> impl Iterator<Item = &ArtifactFile<T>>
Iterate over all artifact files
sourcepub fn artifact_files_mut(
&mut self
) -> impl Iterator<Item = &mut ArtifactFile<T>>
pub fn artifact_files_mut(
&mut self
) -> impl Iterator<Item = &mut ArtifactFile<T>>
Iterate over all artifact files
sourcepub fn into_artifacts<O: ArtifactOutput<Artifact = T>>(
self
) -> impl Iterator<Item = (ArtifactId, T)>
pub fn into_artifacts<O: ArtifactOutput<Artifact = T>>(
self
) -> impl Iterator<Item = (ArtifactId, T)>
Returns an iterator over all artifacts and <file name:contract name>
sourcepub fn into_artifacts_with_files(
self
) -> impl Iterator<Item = (String, String, T)>
pub fn into_artifacts_with_files(
self
) -> impl Iterator<Item = (String, String, T)>
Returns an iterator that yields the tuple (file, contract name, artifact)
NOTE this returns the path as is
sourcepub fn into_stripped_file_prefixes(self, base: impl AsRef<Path>) -> Self
pub fn into_stripped_file_prefixes(self, base: impl AsRef<Path>) -> Self
Strips the given prefix from all artifact file paths to make them relative to the given
root argument
Trait Implementations
sourceimpl<T> AsMut<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
impl<T> AsMut<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
sourcefn as_mut(&mut self) -> &mut FileToContractsMap<Vec<ArtifactFile<T>>>
fn as_mut(&mut self) -> &mut FileToContractsMap<Vec<ArtifactFile<T>>>
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl<T> AsRef<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
impl<T> AsRef<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
sourcefn as_ref(&self) -> &FileToContractsMap<Vec<ArtifactFile<T>>>
fn as_ref(&self) -> &FileToContractsMap<Vec<ArtifactFile<T>>>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl<T> From<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
impl<T> From<BTreeMap<String, BTreeMap<String, Vec<ArtifactFile<T>, Global>>>> for Artifacts<T>
sourcefn from(m: FileToContractsMap<Vec<ArtifactFile<T>>>) -> Self
fn from(m: FileToContractsMap<Vec<ArtifactFile<T>>>) -> Self
Converts to this type from the input type.
sourceimpl<'a, T> IntoIterator for &'a Artifacts<T>
impl<'a, T> IntoIterator for &'a Artifacts<T>
sourceimpl<T> IntoIterator for Artifacts<T>
impl<T> IntoIterator for Artifacts<T>
impl<T> StructuralPartialEq for Artifacts<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Artifacts<T> where
T: RefUnwindSafe,
impl<T> Send for Artifacts<T> where
T: Send,
impl<T> Sync for Artifacts<T> where
T: Sync,
impl<T> Unpin for Artifacts<T>
impl<T> UnwindSafe for Artifacts<T> where
T: RefUnwindSafe,
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