pub struct EnvironmentInfo {
pub container_runtime: Option<String>,
pub kubernetes: bool,
pub serverless: bool,
pub kernel_version: Option<String>,
pub cpu_count: usize,
}Expand description
Information about the runtime environment.
Collects information about the system environment to help guide performance optimization and provide helpful warnings.
Fields§
§container_runtime: Option<String>Detected container runtime (docker, containerd, etc.)
kubernetes: boolWhether running in Kubernetes
serverless: boolWhether running in a cloud serverless environment
kernel_version: Option<String>Kernel version for Linux systems
cpu_count: usizeAvailable CPU count
Implementations§
Source§impl EnvironmentInfo
impl EnvironmentInfo
Sourcepub fn is_cloud_environment(&self) -> bool
pub fn is_cloud_environment(&self) -> bool
Check if running in any kind of cloud environment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnvironmentInfo
impl RefUnwindSafe for EnvironmentInfo
impl Send for EnvironmentInfo
impl Sync for EnvironmentInfo
impl Unpin for EnvironmentInfo
impl UnwindSafe for EnvironmentInfo
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