pub struct VulkanVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
A Vulkan API version, e.g. 1.3.280.
Ordered major first, so a host can be checked against a minimum:
use gpu_probe::VulkanVersion;
assert!(VulkanVersion::new(1, 3, 280) >= VulkanVersion::new(1, 2, 0));Constructible so callers can express such a requirement.
Gate on major/minor. Vulkan’s patch number is the spec header revision
and carries no feature guarantee — a 1.4.354 driver and a 1.4.357 loader
are both Vulkan 1.4 — so a patch-sensitive comparison rejects builds that
would have run.
Fields§
§major: u32Major version — the 1 in 1.3.280.
minor: u32Minor version — the 3 in 1.3.280.
patch: u32Patch version — the 280 in 1.3.280. The spec header revision, not
a feature level.
Implementations§
Trait Implementations§
Source§impl Clone for VulkanVersion
impl Clone for VulkanVersion
Source§fn clone(&self) -> VulkanVersion
fn clone(&self) -> VulkanVersion
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 VulkanVersion
Source§impl Debug for VulkanVersion
impl Debug for VulkanVersion
Source§impl Display for VulkanVersion
impl Display for VulkanVersion
impl Eq for VulkanVersion
Source§impl Hash for VulkanVersion
impl Hash for VulkanVersion
Source§impl Ord for VulkanVersion
impl Ord for VulkanVersion
Source§fn cmp(&self, other: &VulkanVersion) -> Ordering
fn cmp(&self, other: &VulkanVersion) -> 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 VulkanVersion
impl PartialEq for VulkanVersion
Source§impl PartialOrd for VulkanVersion
impl PartialOrd for VulkanVersion
impl StructuralPartialEq for VulkanVersion
Auto Trait Implementations§
impl Freeze for VulkanVersion
impl RefUnwindSafe for VulkanVersion
impl Send for VulkanVersion
impl Sync for VulkanVersion
impl Unpin for VulkanVersion
impl UnsafeUnpin for VulkanVersion
impl UnwindSafe for VulkanVersion
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