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: Stringsource: PathBufOriginal source file path
version: Versionsolc version that produced this artifact
Implementations
sourceimpl 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
sourceimpl Clone for ArtifactId
impl Clone for ArtifactId
sourcefn clone(&self) -> ArtifactId
fn clone(&self) -> ArtifactId
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 moresourceimpl Debug for ArtifactId
impl Debug for ArtifactId
sourceimpl<'de> Deserialize<'de> for ArtifactId
impl<'de> Deserialize<'de> for ArtifactId
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 Hash for ArtifactId
impl Hash for ArtifactId
sourceimpl Ord for ArtifactId
impl Ord for ArtifactId
sourcefn cmp(&self, other: &ArtifactId) -> Ordering
fn cmp(&self, other: &ArtifactId) -> Ordering
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ArtifactId> for ArtifactId
impl PartialEq<ArtifactId> for ArtifactId
sourcefn eq(&self, other: &ArtifactId) -> bool
fn eq(&self, other: &ArtifactId) -> bool
sourceimpl PartialOrd<ArtifactId> for ArtifactId
impl PartialOrd<ArtifactId> for ArtifactId
sourcefn partial_cmp(&self, other: &ArtifactId) -> Option<Ordering>
fn partial_cmp(&self, other: &ArtifactId) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl Serialize for ArtifactId
impl Serialize for ArtifactId
impl Eq for ArtifactId
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.