Struct ethers_solc::ArtifactId
source · pub struct ArtifactId {
pub path: PathBuf,
pub name: String,
pub source: PathBuf,
pub version: Version,
}
Expand description
Represents unique artifact metadata for identifying artifacts on output
Fields§
§path: PathBuf
artifact
cache path
name: String
§source: PathBuf
Original source file path
version: Version
solc
version that produced this artifact
Implementations§
source§impl ArtifactId
impl ArtifactId
sourcepub fn slash_paths(&mut self)
pub fn slash_paths(&mut self)
Converts any \\
separators in the path
to /
sourcepub fn with_slashed_paths(self) -> Self
pub fn with_slashed_paths(self) -> Self
Convenience function fo Self::slash_paths()
sourcepub fn slug(&self) -> String
pub fn slug(&self) -> String
Returns a <filename>:<name>
slug that identifies an artifact
Note: This identifier is not necessarily unique. If two contracts have the same name, they will share the same slug. For a unique identifier see ArtifactId::identifier.
sourcepub fn identifier(&self) -> String
pub fn identifier(&self) -> String
Returns a <source path>:<name>
slug that uniquely identifies an artifact
sourcepub fn slug_versioned(&self) -> String
pub fn slug_versioned(&self) -> String
Returns a <filename><version>:<name>
slug that identifies an artifact
Trait Implementations§
source§impl Clone for ArtifactId
impl Clone for ArtifactId
source§fn clone(&self) -> ArtifactId
fn clone(&self) -> ArtifactId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ArtifactId
impl Debug for ArtifactId
source§impl<'de> Deserialize<'de> for ArtifactId
impl<'de> Deserialize<'de> for ArtifactId
source§fn 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
source§impl Hash for ArtifactId
impl Hash for ArtifactId
source§impl Ord for ArtifactId
impl Ord for ArtifactId
source§fn cmp(&self, other: &ArtifactId) -> Ordering
fn cmp(&self, other: &ArtifactId) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ArtifactId
impl PartialEq for ArtifactId
source§fn eq(&self, other: &ArtifactId) -> bool
fn eq(&self, other: &ArtifactId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ArtifactId
impl PartialOrd for ArtifactId
source§fn partial_cmp(&self, other: &ArtifactId) -> Option<Ordering>
fn partial_cmp(&self, other: &ArtifactId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ArtifactId
impl Serialize for ArtifactId
impl Eq for ArtifactId
impl StructuralPartialEq for ArtifactId
Auto Trait Implementations§
impl RefUnwindSafe for ArtifactId
impl Send for ArtifactId
impl Sync for ArtifactId
impl Unpin for ArtifactId
impl UnwindSafe for ArtifactId
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.