Function detect_from

Source
pub fn detect_from(variants: &VariantDefTop) -> Result<&Variant, VariantError>
Expand description

Detect the current host’s variant from the supplied data.

§Errors

May return a VariantError, either “unknown variant” or a wrapper around an underlying error condition:

  • any os-release parse errors from crate::yai::parse() other than “file not found”
  • I/O errors from reading the distribution-specific version files (e.g. /etc/redhat-release)