pub struct HostEnvironment {
pub kind: EnvironmentKind,
pub evidence: Box<str>,
pub confidence: Confidence,
pub container: Option<ContainerIdentity>,
}Expand description
A heuristic environment classification together with its evidence.
Fields§
§kind: EnvironmentKindWhat we think this is.
evidence: Box<str>What led to that conclusion, e.g. "/proc/1/cgroup names docker".
Rendered next to the classification so the user can judge it themselves.
confidence: ConfidenceHow much the evidence supports the conclusion.
container: Option<ContainerIdentity>Which container this is, where the evidence named one.
EnvironmentKind::Container answers whether; this answers which, and the
two are separate because the evidence often supports the first without the
second — a /.dockerenv file, or a container= environment variable, says a
container without naming it. None alongside Container is therefore an
ordinary outcome and not a gap to be filled with a placeholder id.
Trait Implementations§
Source§impl Clone for HostEnvironment
impl Clone for HostEnvironment
Source§fn clone(&self) -> HostEnvironment
fn clone(&self) -> HostEnvironment
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 HostEnvironment
impl Debug for HostEnvironment
Source§impl PartialEq for HostEnvironment
impl PartialEq for HostEnvironment
impl StructuralPartialEq for HostEnvironment
Auto Trait Implementations§
impl Freeze for HostEnvironment
impl RefUnwindSafe for HostEnvironment
impl Send for HostEnvironment
impl Sync for HostEnvironment
impl Unpin for HostEnvironment
impl UnsafeUnpin for HostEnvironment
impl UnwindSafe for HostEnvironment
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