pub struct OneApiVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
An Intel oneAPI toolkit version, e.g. 2024.2.1.
Ordered major first — which for oneAPI is the release year — so a host
can be checked against a minimum:
use gpu_probe::OneApiVersion;
assert!(OneApiVersion::new(2025, 0, 0) >= OneApiVersion::new(2024, 2, 0));Constructible so callers can express such a requirement.
Fields§
§major: u32Major version — the release year, the 2024 in 2024.2.1.
minor: u32Minor version — the 2 in 2024.2.1.
patch: u32Patch version — the 1 in 2024.2.1.
Implementations§
Trait Implementations§
Source§impl Clone for OneApiVersion
impl Clone for OneApiVersion
Source§fn clone(&self) -> OneApiVersion
fn clone(&self) -> OneApiVersion
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 moreimpl Copy for OneApiVersion
Source§impl Debug for OneApiVersion
impl Debug for OneApiVersion
Source§impl Display for OneApiVersion
impl Display for OneApiVersion
impl Eq for OneApiVersion
Source§impl Hash for OneApiVersion
impl Hash for OneApiVersion
Source§impl Ord for OneApiVersion
impl Ord for OneApiVersion
Source§fn cmp(&self, other: &OneApiVersion) -> Ordering
fn cmp(&self, other: &OneApiVersion) -> Ordering
1.21.0 (const: unstable) · 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 OneApiVersion
impl PartialEq for OneApiVersion
Source§impl PartialOrd for OneApiVersion
impl PartialOrd for OneApiVersion
impl StructuralPartialEq for OneApiVersion
Auto Trait Implementations§
impl Freeze for OneApiVersion
impl RefUnwindSafe for OneApiVersion
impl Send for OneApiVersion
impl Sync for OneApiVersion
impl Unpin for OneApiVersion
impl UnsafeUnpin for OneApiVersion
impl UnwindSafe for OneApiVersion
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