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: PathBufartifact cache path
name: String§source: PathBufOriginal source file path
version: Versionsolc 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<ArtifactId> for ArtifactId
impl PartialEq<ArtifactId> 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<ArtifactId> for ArtifactId
impl PartialOrd<ArtifactId> 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 more