pub struct ProtectionReport {
pub mapping: ProtectionState,
pub memory_lock: ProtectionState,
pub dump_exclusion: ProtectionState,
pub fork: ForkProtectionReport,
pub guard_pages: ProtectionState,
pub canary: ProtectionState,
pub cache_policy: ProtectionState,
pub requested_bytes: usize,
pub mapped_bytes: usize,
pub locked_bytes: usize,
pub page_granule: usize,
pub lock_quota_likely: bool,
}Expand description
Runtime report retained by a mapped secret container.
Fields§
§mapping: ProtectionStatePrivate mapping or compatibility storage outcome.
memory_lock: ProtectionStatePage-lock outcome.
dump_exclusion: ProtectionStateCore-dump exclusion outcome.
fork: ForkProtectionReportProcess-fork behavior outcome.
guard_pages: ProtectionStateGuard-page outcome.
canary: ProtectionStateCanary integrity outcome.
cache_policy: ProtectionStatePersistent cache-policy outcome.
requested_bytes: usizeSecret payload bytes requested by the caller.
mapped_bytes: usizeBytes in the owned platform mapping.
locked_bytes: usizeBytes successfully locked against ordinary paging.
page_granule: usizePage granule used for mapping arithmetic, or zero for compatibility storage without host page control.
lock_quota_likely: boolWhether a lock failure code is commonly associated with a lock quota or working-set limit.
Implementations§
Source§impl ProtectionReport
impl ProtectionReport
Sourcepub const fn satisfies(&self, request: ProtectionRequest) -> bool
pub const fn satisfies(&self, request: ProtectionRequest) -> bool
Returns whether the mapping is live and every requested control was established or did not apply to empty storage.
This is stricter than construction success: a failed or unsupported
Requirement::Preferred control returns false, even though
construction may legitimately have returned a live reduced-protection
container. Controls marked Requirement::NotRequested are ignored.
Sourcepub const fn all_requested_controls_established(
&self,
request: ProtectionRequest,
) -> bool
pub const fn all_requested_controls_established( &self, request: ProtectionRequest, ) -> bool
Returns whether every requested control was established or did not apply to empty storage.
This compatibility spelling is equivalent to
ProtectionReport::satisfies.
Sourcepub const fn is_degraded(&self) -> bool
pub const fn is_degraded(&self) -> bool
Returns whether this report records reduced or unusable protection.
A failed, unsupported, or compatibility-only control is degraded.
NotApplicable is accepted only when requested_bytes is zero; for
nonempty storage it indicates a released or missing control and is
degraded. Unrequested controls are ignored.
Sourcepub const fn memory_is_locked(&self) -> bool
pub const fn memory_is_locked(&self) -> bool
Returns whether the page-lock control was established.
Empty storage reports NotApplicable and therefore returns false.
Sourcepub const fn guard_pages_established(&self) -> bool
pub const fn guard_pages_established(&self) -> bool
Returns whether inaccessible guard pages were established.
Empty storage reports NotApplicable and therefore returns false.
Sourcepub fn failed_or_unsupported_controls(
&self,
) -> impl Iterator<Item = ProtectionControl>
pub fn failed_or_unsupported_controls( &self, ) -> impl Iterator<Item = ProtectionControl>
Iterates over controls that failed, are unsupported, or are available only through a reduced-guarantee compatibility backend.
The iterator allocates no memory and yields controls in stable report
order: mapping, memory lock, dump exclusion, fork policy, guard pages,
canary, and cache policy. NotRequested controls are omitted.
NotApplicable is omitted only for genuinely empty storage and is
reported as unavailable for nonempty storage.