pub struct Os { /* private fields */ }
Expand description
The OS fields contain information about the operating system.
Implementations§
Source§impl Os
impl Os
Sourcepub fn get_type(&self) -> Option<&String>
pub fn get_type(&self) -> Option<&String>
Use the os.type
field to categorize the operating system into one of the broad commercial families.
If the OS you’re dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
Sourcepub fn set_type(&mut self, type_arg: String)
pub fn set_type(&mut self, type_arg: String)
Use the os.type
field to categorize the operating system into one of the broad commercial families.
If the OS you’re dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
§Example
macos
Sourcepub fn get_platform(&self) -> Option<&String>
pub fn get_platform(&self) -> Option<&String>
Operating system platform (such centos, ubuntu, windows).
Sourcepub fn set_platform(&mut self, platform_arg: String)
pub fn set_platform(&mut self, platform_arg: String)
Sourcepub fn get_full(&self) -> Option<&String>
pub fn get_full(&self) -> Option<&String>
Operating system name, including the version or code name.
Sourcepub fn get_family(&self) -> Option<&String>
pub fn get_family(&self) -> Option<&String>
OS family (such as redhat, debian, freebsd, windows).
Sourcepub fn set_family(&mut self, family_arg: String)
pub fn set_family(&mut self, family_arg: String)
Sourcepub fn get_version(&self) -> Option<&String>
pub fn get_version(&self) -> Option<&String>
Operating system version as a raw string.
Sourcepub fn set_version(&mut self, version_arg: String)
pub fn set_version(&mut self, version_arg: String)
Sourcepub fn get_kernel(&self) -> Option<&String>
pub fn get_kernel(&self) -> Option<&String>
Operating system kernel version as a raw string.