[−][src]Struct pkg_utils::PkgSpec
This is some package info that can be gained just from parsing file names, not tucking into the tar entries that contain more extensive metadata.
Fields
name: String
arch: Option<String>
Methods
impl PkgSpec
[src]
pub fn split_specifier(specifier: &str) -> Option<PkgSpec>
[src]
Parse a package specifier. None
is returned if the provided
string is not a valid specifier. Any of the following are valid:
pacman-5.1.1-2
, pacman-5.1.1-2/
, or pacman-5.1.1-2/desc
(trailing paths are removed).
pub fn split_pkgname(name: &str) -> Option<PkgSpec>
[src]
Parse a full package name, such as pacman-5.1.1-2-x86_64
This is similar to split_specifier,
except it does not accept trailing paths, and includes an
architecture specifier on the backend.
pub fn version_str(&self) -> String
[src]
Trait Implementations
Auto Trait Implementations
impl Unpin for PkgSpec
impl Sync for PkgSpec
impl Send for PkgSpec
impl UnwindSafe for PkgSpec
impl RefUnwindSafe for PkgSpec
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,