pub struct SpecVersion {
pub major_ver: u8,
pub minor_ver: u8,
pub docrev_ver: u8,
}Expand description
Utility for comparing SMBIOS specification versions.
Fields§
§major_ver: u8§minor_ver: u8§docrev_ver: u8Implementations§
Source§impl SpecVersion
impl SpecVersion
Sourcepub const fn new_v2(major: u8, minor: u8) -> Self
pub const fn new_v2(major: u8, minor: u8) -> Self
Creates a new SpecVersion for SMBIOS 2.x (docrev defaults to 0).
Sourcepub const fn includes_version(
&self,
spec_major_ver: u8,
spec_minor_ver: u8,
spec_docrev_ver: u8,
) -> bool
pub const fn includes_version( &self, spec_major_ver: u8, spec_minor_ver: u8, spec_docrev_ver: u8, ) -> bool
Returns true if this version is at least the queried version.
Trait Implementations§
Source§impl Clone for SpecVersion
impl Clone for SpecVersion
Source§fn clone(&self) -> SpecVersion
fn clone(&self) -> SpecVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpecVersion
Source§impl Debug for SpecVersion
impl Debug for SpecVersion
Source§impl Default for SpecVersion
impl Default for SpecVersion
Source§fn default() -> SpecVersion
fn default() -> SpecVersion
Returns the “default value” for a type. Read more
impl Eq for SpecVersion
Source§impl Hash for SpecVersion
impl Hash for SpecVersion
Source§impl Ord for SpecVersion
impl Ord for SpecVersion
Source§fn cmp(&self, other: &SpecVersion) -> Ordering
fn cmp(&self, other: &SpecVersion) -> Ordering
1.21.0 (const: unstable)§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
1.21.0 (const: unstable)§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SpecVersion
impl PartialEq for SpecVersion
Source§impl PartialOrd for SpecVersion
impl PartialOrd for SpecVersion
impl StructuralPartialEq for SpecVersion
Auto Trait Implementations§
impl Freeze for SpecVersion
impl RefUnwindSafe for SpecVersion
impl Send for SpecVersion
impl Sync for SpecVersion
impl Unpin for SpecVersion
impl UnsafeUnpin for SpecVersion
impl UnwindSafe for SpecVersion
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)