pub struct BuildToolVersion {
version: Version,
architecture: Option<Architecture>,
}
Expand description
The version and architecture of a build tool
BuildToolVersion
is used in conjunction with BuildTool
to denote the specific build tool a
package is built with. A BuildToolVersion
wraps a Version
(that is guaranteed to have a
Pkgrel
) and an Architecture
.
§Examples
use std::str::FromStr;
use alpm_types::BuildToolVersion;
assert!(BuildToolVersion::from_str("1-1-any").is_ok());
assert!(BuildToolVersion::from_str("1").is_ok());
assert!(BuildToolVersion::from_str("1-1").is_err());
assert!(BuildToolVersion::from_str("1-1-foo").is_err());
Fields§
§version: Version
§architecture: Option<Architecture>
Implementations§
source§impl BuildToolVersion
impl BuildToolVersion
sourcepub fn new(version: Version, architecture: Option<Architecture>) -> Self
pub fn new(version: Version, architecture: Option<Architecture>) -> Self
Create a new BuildToolVersion
sourcepub fn architecture(&self) -> &Option<Architecture>
pub fn architecture(&self) -> &Option<Architecture>
Return a reference to the Architecture
Trait Implementations§
source§impl Clone for BuildToolVersion
impl Clone for BuildToolVersion
source§fn clone(&self) -> BuildToolVersion
fn clone(&self) -> BuildToolVersion
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 BuildToolVersion
impl Debug for BuildToolVersion
source§impl Display for BuildToolVersion
impl Display for BuildToolVersion
source§impl FromStr for BuildToolVersion
impl FromStr for BuildToolVersion
source§impl Ord for BuildToolVersion
impl Ord for BuildToolVersion
source§fn cmp(&self, other: &BuildToolVersion) -> Ordering
fn cmp(&self, other: &BuildToolVersion) -> 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 BuildToolVersion
impl PartialEq for BuildToolVersion
source§impl PartialOrd for BuildToolVersion
impl PartialOrd for BuildToolVersion
impl Eq for BuildToolVersion
impl StructuralPartialEq for BuildToolVersion
Auto Trait Implementations§
impl Freeze for BuildToolVersion
impl RefUnwindSafe for BuildToolVersion
impl Send for BuildToolVersion
impl Sync for BuildToolVersion
impl Unpin for BuildToolVersion
impl UnwindSafe for BuildToolVersion
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
)