pub struct Platform(/* private fields */);
Expand description
Host system information.
§Provided information
For example, for Linux host command uname -a
returns the following line:
$ uname -a
Linux tardis 5.0.5-arch1-1-ARCH #1 SMP PREEMPT Wed Mar 27 17:53:10 UTC 2019 x86_64 GNU/Linux
Information in this struct for the same host will look like this:
Platform {
system: "Linux",
release: "5.0.5-arch1-1-ARCH",
version: "#1 SMP PREEMPT Wed Mar 27 17:53:10 UTC 2019",
hostname: "tardis",
architecture: X86_64,
}
Windows example:
Platform {
system: "Windows",
release: "10",
version: "17763",
hostname: "WINDEV1905EVAL",
architecture: X86_64,
}
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
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