pub struct Variant<I = DefaultInterner>where
I: Interner,{
pub arch: Arch<I>,
/* private fields */
}Expand description
A Gentoo release media variant.
Represents the {arch}-{tag} format used for stage3 tarballs, ISO images,
and profile selections. The tag encodes the init system and profile variant
(e.g., "openrc", "systemd", "musl-hardened-openrc").
§Memory Efficiency
With the default interner feature, Variant<GlobalInterner> is Copy
(8 bytes) and identical strings share a single allocation. This is useful
when processing many variant references.
§Examples
use gentoo_core::{Variant, Arch, KnownArch};
let variant: Variant = "arm64-openrc".parse().unwrap();
assert!(matches!(variant.arch, Arch::Known(KnownArch::AArch64)));
assert_eq!(variant.flavor(), "openrc");Fields§
§arch: Arch<I>Variant architecture.
Implementations§
Trait Implementations§
impl<I: Interner> Copy for Variant<I>
impl<I> Eq for Variant<I>
impl<I> StructuralPartialEq for Variant<I>where
I: Interner,
Auto Trait Implementations§
impl<I> Freeze for Variant<I>
impl<I> RefUnwindSafe for Variant<I>
impl<I> Send for Variant<I>
impl<I> Sync for Variant<I>
impl<I> Unpin for Variant<I>
impl<I> UnsafeUnpin for Variant<I>
impl<I> UnwindSafe for Variant<I>
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