Struct mdbx::from_base58
ClassList > mdbx > from_base58
Base58 decoder which satisfySliceTranscoder concept.
#include <mdbx.h++>
Public Attributes
| Type | Name |
|---|---|
| const bool | ignore_spaces Skip whitespaces while decoding. |
| const slice | source The slice with a Base58 dump to be decoded. |
Public Functions
| Type | Name |
|---|---|
| size_t | envisage_result_length () noexcept const Returns the number of bytes needed for conversion Base58 dump from a passed slice to decoded data. |
| constexpr | from_base58 (const slice & source, bool ignore_spaces=false) noexcept Constructs the decoder for the given slice. |
| bool | is_empty () noexcept const Checks whether a passed slice is empty, and therefore there will be no output bytes. |
| bool | is_erroneous () noexcept const Checks whether the content of a passed slice is a valid Base58 dump, and therefore can be decoded without errors. |
| char * | write_bytes (char * dest, size_t dest_size) const Fills the destination with data decoded from Base58 dump from a passed slice. |
Public Attributes Documentation
variable ignore_spaces
Skip whitespaces while decoding.
const bool mdbx::from_base58::ignore_spaces;
variable source
The slice with a Base58 dump to be decoded.
const slice mdbx::from_base58::source;
Public Functions Documentation
function envisage_result_length
Returns the number of bytes needed for conversion Base58 dump from a passed slice to decoded data.
inline size_t mdbx::from_base58::envisage_result_length () noexcept const
Returns:
The required buffer size in bytes.
function from_base58
Constructs the decoder for the given slice.
inline constexpr mdbx::from_base58::from_base58 (
const slice & source,
bool ignore_spaces=false
) noexcept
Parameters:
sourceThe slice with a Base58 dump to be decoded.ignore_spacesSkip whitespaces while decoding.
function is_empty
Checks whether a passed slice is empty, and therefore there will be no output bytes.
inline bool mdbx::from_base58::is_empty () noexcept const
Returns:
true if the source slice is empty.
function is_erroneous
Checks whether the content of a passed slice is a valid Base58 dump, and therefore can be decoded without errors.
bool mdbx::from_base58::is_erroneous () noexcept const
Returns:
true if the source slice is NOT a valid Base58 dump.
function write_bytes
Fills the destination with data decoded from Base58 dump from a passed slice.
char * mdbx::from_base58::write_bytes (
char * dest,
size_t dest_size
) const
Parameters:
destThe destination buffer to be filled.dest_sizeThe size of the destination buffer.
Returns:
The pointer just after the last written byte.
Exception:
std::length_errorif given buffer is too small.
The documentation for this class was generated from the following file mdbx.h++