libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::ByteView Class Reference

Input byte range. Implicitly constructible from std::string_view / std::vector<std::byte>. More...

#include <types.hpp>

Inheritance diagram for sshpp::ByteView:
[legend]
Collaboration diagram for sshpp::ByteView:
[legend]

Public Member Functions

constexpr ByteView () noexcept=default
 
 ByteView (std::string_view sv) noexcept
 
 ByteView (const std::vector< std::byte > &v) noexcept
 
std::string_view as_string_view () const noexcept
 
constexpr BasicByteSpan () noexcept=default
 
constexpr BasicByteSpan (T *data, std::size_t size) noexcept
 
template<class Byte , class = std::enable_if_t<sizeof(Byte) == 1 && std::is_const_v<T>>>
 BasicByteSpan (const Byte *data, std::size_t size) noexcept
 
template<class Byte , class = std::enable_if_t<sizeof(Byte) == 1 && !std::is_const_v<T>>>
 BasicByteSpan (Byte *data, std::size_t size) noexcept
 
- Public Member Functions inherited from sshpp::BasicByteSpan< const std::byte >
constexpr BasicByteSpan () noexcept=default
 
constexpr BasicByteSpan (const std::byte *data, std::size_t size) noexcept
 
 BasicByteSpan (const Byte *data, std::size_t size) noexcept
 
 BasicByteSpan (Byte *data, std::size_t size) noexcept
 
constexpr const std::byte * data () const noexcept
 
constexpr std::size_t size () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr const std::byte & operator[] (std::size_t i) const noexcept
 
constexpr const std::byte * begin () const noexcept
 
constexpr const std::byte * end () const noexcept
 
BasicByteSpan subspan (std::size_t offset, std::size_t count=static_cast< std::size_t >(-1)) const noexcept
 

Additional Inherited Members

- Public Types inherited from sshpp::BasicByteSpan< const std::byte >
using element_type = const std::byte
 

Detailed Description

Input byte range. Implicitly constructible from std::string_view / std::vector<std::byte>.

Constructor & Destructor Documentation

◆ ByteView() [1/3]

constexpr sshpp::ByteView::ByteView ( )
constexprdefaultnoexcept

◆ ByteView() [2/3]

sshpp::ByteView::ByteView ( std::string_view  sv)
inlinenoexcept

◆ ByteView() [3/3]

sshpp::ByteView::ByteView ( const std::vector< std::byte > &  v)
inlinenoexcept

Member Function Documentation

◆ as_string_view()

std::string_view sshpp::ByteView::as_string_view ( ) const
inlinenoexcept

◆ BasicByteSpan() [1/4]

constexpr sshpp::BasicByteSpan< T >::BasicByteSpan ( )
constexprdefaultnoexcept

◆ BasicByteSpan() [2/4]

constexpr sshpp::BasicByteSpan< T >::BasicByteSpan ( T *  data,
std::size_t  size 
)
inlineconstexprnoexcept

◆ BasicByteSpan() [3/4]

template<class Byte , class = std::enable_if_t<sizeof(Byte) == 1 && std::is_const_v<T>>>
sshpp::BasicByteSpan< T >::BasicByteSpan ( const Byte *  data,
std::size_t  size 
)
inlinenoexcept

◆ BasicByteSpan() [4/4]

template<class Byte , class = std::enable_if_t<sizeof(Byte) == 1 && !std::is_const_v<T>>>
sshpp::BasicByteSpan< T >::BasicByteSpan ( Byte *  data,
std::size_t  size 
)
inlinenoexcept

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