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§impl PartialOrd for ArtifactId
impl PartialOrd for ArtifactId
Source§impl Serialize for ArtifactId
impl Serialize for ArtifactId
impl Eq for ArtifactId
impl StructuralPartialEq for ArtifactId
Auto Trait Implementations§
impl Freeze for ArtifactId
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more