pub struct OsRelease {Show 21 fields
pub name: String,
pub id: Option<String>,
pub id_like: Option<String>,
pub pretty_name: Option<String>,
pub cpe_name: Option<String>,
pub variant: Option<String>,
pub variant_id: Option<String>,
pub version: Option<String>,
pub version_id: Option<String>,
pub version_codename: Option<String>,
pub build_id: Option<String>,
pub image_id: Option<String>,
pub image_version: Option<String>,
pub home_url: Option<String>,
pub documentation_url: Option<String>,
pub support_url: Option<String>,
pub bug_report_url: Option<String>,
pub privacy_policy_url: Option<String>,
pub logo: Option<String>,
pub default_hostname: Option<String>,
pub sysext_level: Option<String>,
}Expand description
Information about installed distro from /etc/os-release
Information from freedesktop portal.
Fields§
§name: StringThe operating system name without a version component
If not set, a default Linux value may be used
id: Option<String>A lower-case string identifying the OS, excluding any version information
id_like: Option<String>A space-separated list of operating system identifiers in the
same syntax as the id param.
pretty_name: Option<String>A pretty OS name in a format suitable for presentation to the user. May or may not contain a release code or OS version of some kind, as suitable
cpe_name: Option<String>A CPE name for the OS, in URI binding syntax
variant: Option<String>Specific variant or edition of the OS suitable for presentation to the user
variant_id: Option<String>Lower-case string identifying a specific variant or edition of the OS
version: Option<String>The OS version, excluding any OS name information, possibly including a release code name, and suitable for presentation to the user
version_id: Option<String>A lower-case string identifying the OS version, excluding any OS name information or release code name
version_codename: Option<String>A lower-case string identifying the OS release code name, excluding any OS name information or release version
build_id: Option<String>A string uniquely identifying the system image originally used as the installation base
image_id: Option<String>A lower-case string, identifying a specific image of the OS. This is supposed to be used for envs where OS images are prepared, built, shipped and updated as comprehensive, consistent OS images
image_version: Option<String>A lower-case string identifying the OS image version. This is
supposed to be used together with image_id describes above,
to discern different versions of the same image
home_url: Option<String>Home URL of installed OS
documentation_url: Option<String>Documentation URL of installed OS
support_url: Option<String>Support URL of installed OS
bug_report_url: Option<String>URL for bug reports
privacy_policy_url: Option<String>URL with information about privacy policy of the installed OS
logo: Option<String>A string, specifying the name of an icon as defined by freedesktop.org Icon Theme Specification
default_hostname: Option<String>Default hostname if hostname(5) isn’t present and no other
configuration source specifies the hostname
sysext_level: Option<String>A lower-case string identifying the OS extensions support level, to indicate which extension images are supported.
See systemd-sysext(8) for more information
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OsRelease
impl RefUnwindSafe for OsRelease
impl Send for OsRelease
impl Sync for OsRelease
impl Unpin for OsRelease
impl UnwindSafe for OsRelease
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more