Struct minidump::MinidumpSystemInfo
source · [−]pub struct MinidumpSystemInfo {
pub raw: MINIDUMP_SYSTEM_INFO,
pub os: Os,
pub cpu: Cpu,
/* private fields */
}
Expand description
Information about the system that generated the minidump.
Fields
raw: MINIDUMP_SYSTEM_INFO
The MINIDUMP_SYSTEM_INFO
direct from the minidump
os: Os
The operating system that generated the minidump
cpu: Cpu
The CPU on which the minidump was generated
Implementations
sourceimpl MinidumpSystemInfo
impl MinidumpSystemInfo
sourcepub fn print<T: Write>(&self, f: &mut T) -> Result<()>
pub fn print<T: Write>(&self, f: &mut T) -> Result<()>
Write a human-readable description of this MinidumpSystemInfo
to f
.
This is very verbose, it is the format used by minidump_dump
.
sourcepub fn csd_version(&self) -> Option<Cow<'_, str>>
pub fn csd_version(&self) -> Option<Cow<'_, str>>
If the minidump was generated on:
- Windows: Returns the the name of the Service Pack.
- macOS: Returns the product build number.
- Linux: Returns the contents of
uname -srvmo
.
sourcepub fn cpu_info(&self) -> Option<Cow<'_, str>>
pub fn cpu_info(&self) -> Option<Cow<'_, str>>
Returns a string describing the cpu’s vendor and model.
sourcepub fn os_parts(&self) -> (String, Option<String>)
pub fn os_parts(&self) -> (String, Option<String>)
Strings identifying the version and build number of the operating system. Returns a tuple in the format of (version, build number). This may be useful to use if the minidump was created on a Linux machine and is an producing empty-ish version number (0.0.0).
Tries to parse the version number from the build if it cannot be found in the version string. If the stream already contains a valid version number or parsing from the build string fails, this will return what’s directly stored in the stream.
Trait Implementations
sourceimpl Clone for MinidumpSystemInfo
impl Clone for MinidumpSystemInfo
sourcefn clone(&self) -> MinidumpSystemInfo
fn clone(&self) -> MinidumpSystemInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MinidumpSystemInfo
impl Debug for MinidumpSystemInfo
sourceimpl<'a> MinidumpStream<'a> for MinidumpSystemInfo
impl<'a> MinidumpStream<'a> for MinidumpSystemInfo
sourceconst STREAM_TYPE: u32
const STREAM_TYPE: u32
The stream type constant used in the md::MDRawDirectory
entry.
This is usually a MINIDUMP_STREAM_TYPE but it’s left as a u32
to allow external projects to add support for their own custom streams. Read more
Auto Trait Implementations
impl RefUnwindSafe for MinidumpSystemInfo
impl Send for MinidumpSystemInfo
impl Sync for MinidumpSystemInfo
impl Unpin for MinidumpSystemInfo
impl UnwindSafe for MinidumpSystemInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more