pub struct BackendReport {
pub active: Backend,
pub candidate: Backend,
pub simd_feature_enabled: bool,
pub accelerated_backend_active: bool,
pub unsafe_boundary_enforced: bool,
pub security_posture: SecurityPosture,
}Expand description
Backend report for the current build and target.
Fields§
§active: BackendBackend currently used for encode/decode dispatch.
candidate: BackendStrongest backend candidate visible to the current build.
simd_feature_enabled: boolWhether the simd feature is enabled in this build.
accelerated_backend_active: boolWhether an accelerated SIMD backend is active.
unsafe_boundary_enforced: boolWhether unsafe code is confined to the dedicated SIMD boundary.
security_posture: SecurityPostureCurrent security posture.
Implementations§
Source§impl BackendReport
impl BackendReport
Sourcepub const fn satisfies(self, policy: BackendPolicy) -> bool
pub const fn satisfies(self, policy: BackendPolicy) -> bool
Returns whether this report satisfies policy.
let report = base64_ng::runtime::backend_report();
assert!(
report.satisfies(base64_ng::runtime::BackendPolicy::ScalarExecutionOnly)
);Sourcepub const fn candidate_required_cpu_features(self) -> &'static [&'static str]
pub const fn candidate_required_cpu_features(self) -> &'static [&'static str]
Returns the CPU features required by the detected candidate.
let report = base64_ng::runtime::backend_report();
assert_eq!(
report.candidate_required_cpu_features(),
report.candidate.required_cpu_features(),
);Sourcepub const fn snapshot(self) -> BackendSnapshot
pub const fn snapshot(self) -> BackendSnapshot
Returns a compact structured snapshot with stable string values.
let snapshot = base64_ng::runtime::backend_report().snapshot();
assert_eq!(snapshot.active, "scalar");
assert!(!snapshot.accelerated_backend_active);Trait Implementations§
Source§impl Clone for BackendReport
impl Clone for BackendReport
Source§fn clone(&self) -> BackendReport
fn clone(&self) -> BackendReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackendReport
impl Debug for BackendReport
Source§impl Display for BackendReport
impl Display for BackendReport
Source§impl PartialEq for BackendReport
impl PartialEq for BackendReport
Source§fn eq(&self, other: &BackendReport) -> bool
fn eq(&self, other: &BackendReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for BackendReport
impl Eq for BackendReport
impl StructuralPartialEq for BackendReport
Auto Trait Implementations§
impl Freeze for BackendReport
impl RefUnwindSafe for BackendReport
impl Send for BackendReport
impl Sync for BackendReport
impl Unpin for BackendReport
impl UnsafeUnpin for BackendReport
impl UnwindSafe for BackendReport
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