#[non_exhaustive]pub enum Backend {
Scalar,
Avx512Vbmi,
Avx2,
Ssse3Sse41,
Neon,
WasmSimd128,
}Expand description
A backend that can be reported by base64-ng.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar
The audited scalar backend.
Avx512Vbmi
An AVX-512 VBMI candidate was detected.
Avx2
An AVX2 candidate was detected.
Ssse3Sse41
An SSSE3/SSE4.1 candidate was detected.
Neon
An ARM NEON candidate was detected.
WasmSimd128
A wasm simd128 candidate was detected.
Implementations§
Source§impl Backend
impl Backend
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Returns the stable lowercase identifier for this backend.
assert_eq!(base64_ng::runtime::Backend::Scalar.as_str(), "scalar");Sourcepub const fn required_cpu_features(self) -> &'static [&'static str]
pub const fn required_cpu_features(self) -> &'static [&'static str]
Returns the CPU features required before this backend may be used.
The active backend is still scalar-only. This method exists so security logs can record exactly which future backend feature bundle was detected.
assert_eq!(
base64_ng::runtime::Backend::Avx512Vbmi.required_cpu_features(),
["avx512f", "avx512bw", "avx512vl", "avx512vbmi"],
);Trait Implementations§
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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