libmdbx  0.11.6.39 (2022-04-13T11:05:50+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
mdbx::from_base58 Struct Reference

Base58 decoder which satisfy SliceTranscoder concept. More...

#include <mdbx.h++>

Public Member Functions

MDBX_CXX11_CONSTEXPR from_base58 (const slice &source, bool ignore_spaces=false) noexcept
 
template<class ALLOCATOR = legacy_allocator>
string< ALLOCATOR > as_string (const ALLOCATOR &allocator=ALLOCATOR()) const
 Decodes Base58 dump from a passed slice to returned string. More...
 
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > as_buffer (const ALLOCATOR &allocator=ALLOCATOR()) const
 Decodes Base58 dump from a passed slice to returned buffer. More...
 
MDBX_CXX11_CONSTEXPR size_t envisage_result_length () const noexcept
 Returns the number of bytes needed for conversion Base58 dump from a passed slice to decoded data. More...
 
char * write_bytes (char *dest, size_t dest_size) const
 Fills the destination with data decoded from Base58 dump from a passed slice. More...
 
bool is_empty () const noexcept
 Checks whether a passed slice is empty, and therefore there will be no output bytes. More...
 
bool is_erroneous () const noexcept
 Checks whether the content of a passed slice is a valid Base58 dump, and therefore there could be decoded or not. More...
 

Public Attributes

const slice source
 
const bool ignore_spaces = false
 

Detailed Description

Base58 decoder which satisfy SliceTranscoder concept.

Constructor & Destructor Documentation

◆ from_base58()

MDBX_CXX11_CONSTEXPR mdbx::from_base58::from_base58 ( const slice source,
bool  ignore_spaces = false 
)
inlinenoexcept

Member Function Documentation

◆ as_buffer()

template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer<ALLOCATOR, CAPACITY_POLICY> mdbx::from_base58::as_buffer ( const ALLOCATOR &  allocator = ALLOCATOR()) const
inline

Decodes Base58 dump from a passed slice to returned buffer.

◆ as_string()

template<class ALLOCATOR = legacy_allocator>
string<ALLOCATOR> mdbx::from_base58::as_string ( const ALLOCATOR &  allocator = ALLOCATOR()) const
inline

Decodes Base58 dump from a passed slice to returned string.

◆ envisage_result_length()

MDBX_CXX11_CONSTEXPR size_t mdbx::from_base58::envisage_result_length ( ) const
inlinenoexcept

Returns the number of bytes needed for conversion Base58 dump from a passed slice to decoded data.

◆ is_empty()

bool mdbx::from_base58::is_empty ( ) const
inlinenoexcept

Checks whether a passed slice is empty, and therefore there will be no output bytes.

◆ is_erroneous()

bool mdbx::from_base58::is_erroneous ( ) const
noexcept

Checks whether the content of a passed slice is a valid Base58 dump, and therefore there could be decoded or not.

◆ write_bytes()

char* mdbx::from_base58::write_bytes ( char *  dest,
size_t  dest_size 
) const

Fills the destination with data decoded from Base58 dump from a passed slice.

Exceptions
std::length_errorif given buffer is too small.

Member Data Documentation

◆ ignore_spaces

const bool mdbx::from_base58::ignore_spaces = false

◆ source

const slice mdbx::from_base58::source

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