Struct cargo::core::package_id::PackageId [−][src]
Identifier for a specific version of a package in a specific source.
Implementations
impl PackageId
[src]
pub fn new<T: ToSemver>(
name: impl Into<InternedString>,
version: T,
sid: SourceId
) -> CargoResult<PackageId>
[src]
name: impl Into<InternedString>,
version: T,
sid: SourceId
) -> CargoResult<PackageId>
pub fn pure(
name: InternedString,
version: Version,
source_id: SourceId
) -> PackageId
[src]
name: InternedString,
version: Version,
source_id: SourceId
) -> PackageId
pub fn name(self) -> InternedString
[src]
pub fn version(self) -> &'static Version
[src]
pub fn source_id(self) -> SourceId
[src]
pub fn with_precise(self, precise: Option<String>) -> PackageId
[src]
pub fn with_source_id(self, source: SourceId) -> PackageId
[src]
pub fn map_source(self, to_replace: SourceId, replace_with: SourceId) -> Self
[src]
pub fn stable_hash(self, workspace: &Path) -> PackageIdStableHash<'_>
[src]
impl PackageId
[src]
pub fn as_activations_key(
self
) -> (InternedString, SourceId, SemverCompatibility)
[src]
self
) -> (InternedString, SourceId, SemverCompatibility)
Trait Implementations
impl Clone for PackageId
[src]
impl Copy for PackageId
[src]
impl Debug for PackageId
[src]
impl<'de> Deserialize<'de> for PackageId
[src]
fn deserialize<D>(d: D) -> Result<PackageId, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for PackageId
[src]
impl Eq for PackageId
[src]
impl Hash for PackageId
[src]
fn hash<S: Hasher>(&self, state: &mut S)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for PackageId
[src]
fn cmp(&self, other: &PackageId) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<PackageId> for PackageId
[src]
fn eq(&self, other: &PackageId) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<PackageId> for PackageId
[src]
fn partial_cmp(&self, other: &PackageId) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for PackageId
[src]
impl StructuralEq for PackageId
[src]
Auto Trait Implementations
impl RefUnwindSafe for PackageId
impl Send for PackageId
impl Sync for PackageId
impl Unpin for PackageId
impl UnwindSafe for PackageId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,