pub enum VariantAxis {
None,
Riscv(RiscvIsa),
Armv7(Armv7Variant),
Aarch64(Aarch64Level),
Power(PowerLevel),
X86(X86CpuLevel),
}Expand description
The sub-architecture axis an architecture has, carrying the value a bare architecture name selects.
Stated once per architecture in the arch table. Giving an architecture an axis it does not have yet is one more arm here and one changed line there; nothing else in the tree has to know.
Variants§
None
The architecture has no sub-architecture axis.
Riscv(RiscvIsa)
Armv7(Armv7Variant)
Aarch64(Aarch64Level)
Power(PowerLevel)
X86(X86CpuLevel)
Implementations§
Source§impl VariantAxis
impl VariantAxis
Sourcepub const fn default_variant(self) -> ArchVariant
pub const fn default_variant(self) -> ArchVariant
Sub-architecture a bare architecture name selects. Each value is what that name has always meant to the backend.
Sourcepub const fn accept(self, chosen: ArchVariant) -> ArchVariant
pub const fn accept(self, chosen: ArchVariant) -> ArchVariant
chosen when it belongs to this axis, the axis default otherwise.
Every route into a crate::Target goes through this, so a target cannot hold a
variant of a family its architecture does not have.
Trait Implementations§
Source§impl Clone for VariantAxis
impl Clone for VariantAxis
impl Copy for VariantAxis
Source§impl Debug for VariantAxis
impl Debug for VariantAxis
impl Eq for VariantAxis
Source§impl PartialEq for VariantAxis
impl PartialEq for VariantAxis
impl StructuralPartialEq for VariantAxis
Auto Trait Implementations§
impl Freeze for VariantAxis
impl RefUnwindSafe for VariantAxis
impl Send for VariantAxis
impl Sync for VariantAxis
impl Unpin for VariantAxis
impl UnsafeUnpin for VariantAxis
impl UnwindSafe for VariantAxis
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