pub struct HostSnapshot {
pub hostname: MetricState<Box<str>>,
pub os_name: MetricState<Box<str>>,
pub os_version: MetricState<Box<str>>,
pub kernel_version: MetricState<Box<str>>,
pub arch: &'static str,
pub cpu_brand: MetricState<Box<str>>,
pub uptime: MetricState<Duration>,
pub boot_time: MetricState<SystemTime>,
pub environment: MetricState<HostEnvironment>,
}Expand description
System identity, mostly from the slow sampling tier (§8.6).
Fields§
§hostname: MetricState<Box<str>>Host name.
os_name: MetricState<Box<str>>OS name, e.g. macOS or Debian GNU/Linux.
os_version: MetricState<Box<str>>OS version.
kernel_version: MetricState<Box<str>>Kernel version.
arch: &'static strTarget architecture. Known at compile time, so never unavailable.
cpu_brand: MetricState<Box<str>>CPU model string.
uptime: MetricState<Duration>Time since boot.
boot_time: MetricState<SystemTime>Wall-clock boot time.
environment: MetricState<HostEnvironment>Heuristic container/VM classification.
Implementations§
Source§impl HostSnapshot
impl HostSnapshot
Sourcepub const fn warming_up() -> Self
pub const fn warming_up() -> Self
A snapshot with nothing resolved yet.
Sourcepub fn display_hostname(&self) -> &str
pub fn display_hostname(&self) -> &str
The host name for the header, or a neutral placeholder.
§5.5 puts the host name in the title bar; an empty title would look broken, and “unknown” is honest.
Trait Implementations§
Source§impl Clone for HostSnapshot
impl Clone for HostSnapshot
Source§fn clone(&self) -> HostSnapshot
fn clone(&self) -> HostSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HostSnapshot
impl Debug for HostSnapshot
Source§impl PartialEq for HostSnapshot
impl PartialEq for HostSnapshot
impl StructuralPartialEq for HostSnapshot
Auto Trait Implementations§
impl Freeze for HostSnapshot
impl RefUnwindSafe for HostSnapshot
impl Send for HostSnapshot
impl Sync for HostSnapshot
impl Unpin for HostSnapshot
impl UnsafeUnpin for HostSnapshot
impl UnwindSafe for HostSnapshot
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