|
purify
C++ Purify implementation with native circuit and BPP support
|
Checked span wrapper that guarantees a minimum runtime length. More...
#include <common.hpp>
Public Types | |
| using | element_type = T |
Public Member Functions | |
| template<std::size_t Extent> requires (Extent != std::dynamic_extent && Extent >= MinSize) | |
| constexpr | SpanAtLeast (std::span< T, Extent > span) noexcept |
| constexpr std::span< T > | span () const noexcept |
| constexpr const T * | data () const noexcept |
| constexpr std::size_t | size () const noexcept |
| constexpr auto | begin () const noexcept |
| constexpr auto | end () const noexcept |
| constexpr | operator std::span< T > () const noexcept |
Static Public Member Functions | |
| static Result< SpanAtLeast > | try_from (std::span< T > span) |
Static Public Attributes | |
| static constexpr std::size_t | min_size = MinSize |
This is useful for API boundaries where a raw std::span is too permissive and callers need an explicit checked contract such as "at least 16 bytes of seed material".
Definition at line 129 of file common.hpp.
| using purify::SpanAtLeast< MinSize, T >::element_type = T |
Definition at line 132 of file common.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 136 of file common.hpp.
|
inlineconstexprnoexcept |
Definition at line 157 of file common.hpp.
|
inlineconstexprnoexcept |
Definition at line 149 of file common.hpp.
Referenced by purify::generate_key().
|
inlineconstexprnoexcept |
Definition at line 161 of file common.hpp.
|
inlineconstexprnoexcept |
Definition at line 165 of file common.hpp.
|
inlineconstexprnoexcept |
Definition at line 153 of file common.hpp.
Referenced by purify::generate_key().
|
inlineconstexprnoexcept |
Definition at line 145 of file common.hpp.
Referenced by purify::SpanAtLeast< MinSize, T >::try_from().
|
inlinestatic |
Definition at line 138 of file common.hpp.
References purify::RangeViolation, purify::SpanAtLeast< MinSize, T >::span(), and purify::unexpected_error().
Referenced by purify::generate_key().
|
staticconstexpr |
Definition at line 131 of file common.hpp.