Skip to main content

Module distro

Module distro 

Source
Available on crate feature sys only.
Expand description

OS distribution type for system information.

This module provides a type-safe abstraction for OS distribution names, ensuring valid distribution name strings.

§Distribution Name Format

OS distribution names follow these rules:

  • Must be 1-64 characters
  • Must start with an alphanumeric character
  • Can contain alphanumeric characters, spaces, hyphens, and underscores

§Examples

use bare_types::sys::Distro;

// Parse from string
let distro: Distro = "Ubuntu".parse()?;

// Access as string
assert_eq!(distro.as_str(), "Ubuntu");

Structs§

Distro
OS distribution name.

Enums§

DistroError
Error type for distribution name parsing.