pub struct PackageCoordinate { /* private fields */ }Expand description
Coordinate that uniquely identifies a package for lock scoping.
Implementations§
Source§impl PackageCoordinate
impl PackageCoordinate
Sourcepub fn new<S: Into<String>>(
distribution: S,
major_version: u32,
package_kind: PackageKind,
) -> Self
pub fn new<S: Into<String>>( distribution: S, major_version: u32, package_kind: PackageKind, ) -> Self
Creates a new coordinate with the required fields.
pub fn distribution(&self) -> &str
pub fn major_version(&self) -> u32
pub fn package_kind(&self) -> PackageKind
pub fn architecture(&self) -> Option<&str>
pub fn operating_system(&self) -> Option<&str>
pub fn libc_variant(&self) -> Option<&str>
pub fn javafx_bundled(&self) -> bool
pub fn with_architecture<S: Into<String>>(self, architecture: Option<S>) -> Self
pub fn with_operating_system<S: Into<String>>( self, operating_system: Option<S>, ) -> Self
pub fn with_libc_variant<S: Into<String>>(self, libc_variant: Option<S>) -> Self
pub fn with_javafx(self, javafx_bundled: bool) -> Self
Sourcepub fn slug(&self) -> String
pub fn slug(&self) -> String
Generates a deterministic slug suitable for filesystem lock names.
Sourcepub fn try_from_package(package: &Package) -> Result<Self>
pub fn try_from_package(package: &Package) -> Result<Self>
Attempts to build a coordinate from a metadata package definition.
Trait Implementations§
Source§impl Clone for PackageCoordinate
impl Clone for PackageCoordinate
Source§fn clone(&self) -> PackageCoordinate
fn clone(&self) -> PackageCoordinate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PackageCoordinate
impl Debug for PackageCoordinate
impl Eq for PackageCoordinate
Source§impl PartialEq for PackageCoordinate
impl PartialEq for PackageCoordinate
impl StructuralPartialEq for PackageCoordinate
Auto Trait Implementations§
impl Freeze for PackageCoordinate
impl RefUnwindSafe for PackageCoordinate
impl Send for PackageCoordinate
impl Sync for PackageCoordinate
impl Unpin for PackageCoordinate
impl UnsafeUnpin for PackageCoordinate
impl UnwindSafe for PackageCoordinate
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> 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.impl<T> ErasedDestructor for Twhere
T: 'static,
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