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

Synchronous read-only byte borrow, valid only during its callback. More...

#include <secure_string.hpp>

Public Member Functions

const char * data () const noexcept
std::size_t size () const noexcept
bool empty () const noexcept

Friends

class SecureString

Detailed Description

Synchronous read-only byte borrow, valid only during its callback.

There is no implicit string_view conversion. Copying the view does not extend its lifetime. Escaped pointers, caller copies and external API copies remain the caller's responsibility. The payload pages themselves remain writable.

Member Function Documentation

◆ data()

const char * portals::SecretView::data ( ) const
inlinenodiscardnoexcept
Returns
Explicit read-only address, valid until the callback returns.

◆ empty()

bool portals::SecretView::empty ( ) const
inlinenodiscardnoexcept
Returns
Whether the logical byte count is zero.

◆ size()

std::size_t portals::SecretView::size ( ) const
inlinenodiscardnoexcept
Returns
Logical application byte count, excluding capacity/padding.

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