Kagome
Polkadot Runtime Engine in C++17
|
#include <blob.hpp>
Public Types | |
using | const_narref = const byte_t(&)[size_] |
using | const_narptr = const byte_t(*)[size_] |
Public Member Functions | |
Blob () | |
const_narref | internal_array_reference () const |
Blob (const std::array< byte_t, size_ > &l) | |
constructor enabling initializer list More... | |
virtual | ~Blob ()=default |
std::string | toString () const noexcept |
std::string | toHex () const noexcept |
Static Public Member Functions | |
static constexpr size_t | size () |
static outcome::result< Blob< size_ > > | fromString (std::string_view data) |
static outcome::result< Blob< size_ > > | fromHex (std::string_view hex) |
static outcome::result< Blob< size_ > > | fromHexWithPrefix (std::string_view hex) |
static outcome::result< Blob< size_ > > | fromSpan (const gsl::span< const uint8_t > &span) |
Static Public Attributes | |
static constexpr bool | is_static_collection = true |
Base type which represents blob of fixed size.
std::string is convenient to use but it is not safe. We can not specify the fixed length for string.
For std::array it is possible, so we prefer it over std::string.
using kagome::common::Blob< size_ >::const_narptr = const byte_t (*)[size_] |
using kagome::common::Blob< size_ >::const_narref = const byte_t (&)[size_] |
|
inline |
|
inlineexplicit |
|
virtualdefault |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |