Skip to main content

BackendReport

Struct BackendReport 

Source
pub struct BackendReport {
Show 15 fields pub active: Backend, pub accelerated_backend_active: bool, pub security_posture: SecurityPosture, pub encode_backend: OperationBackendReport, pub strict_decode_backend: OperationBackendReport, pub secret_decode_backend: OperationBackendReport, pub candidate: Backend, pub candidate_detection_mode: CandidateDetectionMode, pub simd_feature_enabled: bool, pub ordinary_acceleration_active: bool, pub unsafe_boundary_enforced: bool, pub wasm_artifact_posture: WasmArtifactPosture, pub wasm_runtime_posture: WasmRuntimePosture, pub wipe_posture: WipePosture, pub ct_gate_posture: CtGatePosture,
}
Expand description

Backend report for the current build and target.

Fields§

§active: Backend

Compatibility alias for ordinary encode. New code should use Self::encode_backend and inspect the separate decode reports.

§accelerated_backend_active: bool

Whether ordinary encode is accelerated; this does not describe strict decode. New code should inspect the operation-specific reports.

§security_posture: SecurityPosture

Compatibility posture for ordinary encode and its candidate. New code should use the operation-specific security postures.

§encode_backend: OperationBackendReport

Strongest healthy ordinary encode backend for qualifying inputs.

Per-call length and alphabet policy can select a narrower backend or scalar fallback without changing this capability-oriented report.

§strict_decode_backend: OperationBackendReport

Selected ordinary strict-decode backend.

§secret_decode_backend: OperationBackendReport

Secret decode backend, independently fixed to the scalar constant-time-oriented boundary.

§candidate: Backend

Strongest backend candidate visible to the current build.

§candidate_detection_mode: CandidateDetectionMode

Whether candidate visibility came from runtime CPU probing, compile-time target features, or a disabled SIMD feature.

§simd_feature_enabled: bool

Whether the simd feature is enabled in this build.

§ordinary_acceleration_active: bool

Whether either ordinary operation selects acceleration.

§unsafe_boundary_enforced: bool

Whether this build keeps the high-assurance scalar unsafe boundary.

This is a conservative compile-time posture signal. It is true only when the reserved simd feature is disabled; simd builds expose additional private prototype boundaries and must use the release evidence scripts for boundary validation.

§wasm_artifact_posture: WasmArtifactPosture

Wasm artifact selection, distinct from native runtime CPU dispatch.

§wasm_runtime_posture: WasmRuntimePosture

Wasm host-runtime identification posture.

§wipe_posture: WipePosture

Current wipe-barrier posture.

§ct_gate_posture: CtGatePosture

Current constant-time result-gate barrier posture.

Implementations§

Source§

impl BackendReport

Source

pub const fn satisfies(self, policy: BackendPolicy) -> bool

Returns whether this report satisfies policy.

let report = base64_ng::runtime::backend_report();

let scalar_only =
    report.satisfies(base64_ng::runtime::BackendPolicy::ScalarExecutionOnly);
assert!(!scalar_only || !report.ordinary_acceleration_active);
Source

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(),
);
Source

pub fn active_decode_backend(self) -> Backend

Returns the typed backend selected by ordinary strict decode.

Prefer Self::strict_decode_backend for stable logging.

Source

pub const fn memory_lock_posture(self) -> MemoryLockPosture

Returns whether base64-ng itself locks secret buffers into physical memory.

This crate intentionally has no OS-specific mlock/VirtualLock integration. High-assurance deployments should pair secret buffers with their own platform-approved memory-locking, swap, hibernation, and crash-dump controls.

Source

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.ordinary_acceleration_active,
    snapshot.encode_backend.backend != "scalar"
        || snapshot.strict_decode_backend.backend != "scalar",
);

Trait Implementations§

Source§

impl Clone for BackendReport

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Copy for BackendReport

Source§

impl Debug for BackendReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BackendReport

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BackendReport

Source§

impl PartialEq for BackendReport

Source§

fn eq(&self, other: &BackendReport) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BackendReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.