pub struct Version {
pub major: u32,
pub minor: u32,
pub revision: u32,
pub build: u32,
}Fields§
§major: u32§minor: u32§revision: u32§build: u32Implementations§
Source§impl Version
impl Version
Sourcepub fn from_current_exe() -> Result<Self, PeVersionError>
Available on crate feature pe only.
pub fn from_current_exe() -> Result<Self, PeVersionError>
pe only.Get the version information from the current executable.
Mainly for plugin usage. Can be used before plugin init.
§Returns
Ok(version) if version info is found, or Err(e) if no version info or reading/parsing fails.
§Example
let version = everything_ipc::Version::from_current_exe()?;
println!("Version: {:?}", version);Sourcepub fn from_exe(exe_path: &Path) -> Result<Self, PeVersionError>
Available on crate feature pe only.
pub fn from_exe(exe_path: &Path) -> Result<Self, PeVersionError>
pe only.Get the version information from a PE executable.
§Arguments
exe_path- Path to the PE executable file.
§Returns
Ok(version) if version info is found, or Err(e) if no version info or reading/parsing fails.
§Example
let version = everything_ipc::Version::from_exe(std::path::Path::new(r"C:\Path\To\Everything.exe"))?;
println!("Version: {:?}", version);Trait Implementations§
Source§impl Ord for Version
impl Ord for Version
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 PartialOrd for Version
impl PartialOrd for Version
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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