Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::SecureStringCleanupErrors Struct Reference

Allocation-free cleanup diagnostics in chronological order. More...

#include <secure_string.hpp>

Public Member Functions

 SecureStringCleanupErrors ()=default
 Construct an empty diagnostic collection.
 SecureStringCleanupErrors (std::optional< SecureStringError > failure) noexcept
 Construct from a possibly absent first failure.
void add (std::optional< SecureStringError > failure) noexcept
 Append an existing diagnostic without allocation; absent errors are ignored.
void append (const SecureStringCleanupErrors &other) noexcept
 Append retained failures and overflow counts from another collection.
bool empty () const noexcept

Public Attributes

std::array< SecureStringError, MAX_SECURE_CLEANUP_ERRORS > errors {}
 First count errors, in actual cleanup order.
std::size_t count {}
 Number of valid entries in errors.
std::size_t omittedCleanupCount {}
 Additional failures omitted because the fixed buffer is full.

Detailed Description

Allocation-free cleanup diagnostics in chronological order.

Constructor & Destructor Documentation

◆ SecureStringCleanupErrors()

portals::SecureStringCleanupErrors::SecureStringCleanupErrors ( std::optional< SecureStringError > failure)
inlinenoexcept

Construct from a possibly absent first failure.

Parameters
failureFirst cleanup error, or no error.

Member Function Documentation

◆ add()

void portals::SecureStringCleanupErrors::add ( std::optional< SecureStringError > failure)
inlinenoexcept

Append an existing diagnostic without allocation; absent errors are ignored.

Parameters
failureError to retain or count after capacity is exhausted.

◆ append()

void portals::SecureStringCleanupErrors::append ( const SecureStringCleanupErrors & other)
inlinenoexcept

Append retained failures and overflow counts from another collection.

Parameters
otherValid source collection whose chronological records are copied.

◆ empty()

bool portals::SecureStringCleanupErrors::empty ( ) const
inlinenodiscardnoexcept
Returns
True when neither retained nor omitted cleanup failures exist.

The documentation for this struct was generated from the following file: