pub struct InstalledPackage {
name: Name,
version: Version,
architecture: Architecture,
}
Expand description
Information on an installed package in an environment
Tracks a Name
, Version
(which is guaranteed to have a Pkgrel
) and Architecture
of a
package in an environment.
§Examples
use std::str::FromStr;
use alpm_types::InstalledPackage;
assert!(InstalledPackage::from_str("foo-bar-1:1.0.0-1-any").is_ok());
assert!(InstalledPackage::from_str("foo-bar-1:1.0.0-1").is_err());
assert!(InstalledPackage::from_str("foo-bar-1:1.0.0-any").is_err());
assert!(InstalledPackage::from_str("1:1.0.0-1-any").is_err());
Fields§
§name: Name
§version: Version
§architecture: Architecture
Implementations§
Trait Implementations§
source§impl Clone for InstalledPackage
impl Clone for InstalledPackage
source§fn clone(&self) -> InstalledPackage
fn clone(&self) -> InstalledPackage
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 InstalledPackage
impl Debug for InstalledPackage
source§impl Display for InstalledPackage
impl Display for InstalledPackage
source§impl FromStr for InstalledPackage
impl FromStr for InstalledPackage
source§impl Ord for InstalledPackage
impl Ord for InstalledPackage
source§fn cmp(&self, other: &InstalledPackage) -> Ordering
fn cmp(&self, other: &InstalledPackage) -> 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 InstalledPackage
impl PartialEq for InstalledPackage
source§impl PartialOrd for InstalledPackage
impl PartialOrd for InstalledPackage
impl Eq for InstalledPackage
impl StructuralPartialEq for InstalledPackage
Auto Trait Implementations§
impl Freeze for InstalledPackage
impl RefUnwindSafe for InstalledPackage
impl Send for InstalledPackage
impl Sync for InstalledPackage
impl Unpin for InstalledPackage
impl UnwindSafe for InstalledPackage
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)