pub struct WindowsVersion {
pub major: u32,
pub minor: u32,
pub build: u32,
}Expand description
represents a specific Windows version
Fields§
§major: u32§minor: u32§build: u32Implementations§
Source§impl WindowsVersion
impl WindowsVersion
Sourcepub const MIN_SUPPORTED: Self
pub const MIN_SUPPORTED: Self
minimum supported version (Windows 7 SP1)
Sourcepub fn current() -> Result<Self>
pub fn current() -> Result<Self>
get current Windows version from PEB
reads OSMajorVersion, OSMinorVersion, OSBuildNumber from PEB
Sourcepub fn release(&self) -> WindowsRelease
pub fn release(&self) -> WindowsRelease
map version to named release
Sourcepub fn is_at_least(&self, release: WindowsRelease) -> bool
pub fn is_at_least(&self, release: WindowsRelease) -> bool
check if current version is at least the given release
Sourcepub fn supports_hash_table(&self) -> bool
pub fn supports_hash_table(&self) -> bool
check if this version has the LdrpHashTable (Windows 8+)
Sourcepub fn supports_base_address_index(&self) -> bool
pub fn supports_base_address_index(&self) -> bool
check if this version has the LdrpModuleBaseAddressIndex (Win8+)
Sourcepub fn is_windows_11(&self) -> bool
pub fn is_windows_11(&self) -> bool
check if Windows 11 (different PEB layout in some areas)
Trait Implementations§
Source§impl Clone for WindowsVersion
impl Clone for WindowsVersion
Source§fn clone(&self) -> WindowsVersion
fn clone(&self) -> WindowsVersion
Returns a duplicate 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 WindowsVersion
impl Debug for WindowsVersion
Source§impl Display for WindowsVersion
impl Display for WindowsVersion
Source§impl Ord for WindowsVersion
impl Ord for WindowsVersion
Source§impl PartialEq for WindowsVersion
impl PartialEq for WindowsVersion
Source§impl PartialOrd for WindowsVersion
impl PartialOrd for WindowsVersion
impl Copy for WindowsVersion
impl Eq for WindowsVersion
impl StructuralPartialEq for WindowsVersion
Auto Trait Implementations§
impl Freeze for WindowsVersion
impl RefUnwindSafe for WindowsVersion
impl Send for WindowsVersion
impl Sync for WindowsVersion
impl Unpin for WindowsVersion
impl UnwindSafe for WindowsVersion
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