|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <result.hpp>
Public Types | |
| using | value_type = T |
| using | error_type = ErrorInfo |
Public Member Functions | |
| Result (T value) | |
| Result (ErrorInfo error) | |
| Result (const Result &)=default | |
| Result (Result &&) noexcept=default | |
| Result & | operator= (const Result &)=default |
| Result & | operator= (Result &&) noexcept=default |
| ~Result ()=default | |
| bool | has_value () const noexcept |
| operator bool () const noexcept | |
| T & | value () & |
| const T & | value () const & |
| T && | value () && |
| template<class U > | |
| T | value_or (U &&fallback) const & |
| T * | operator-> () noexcept |
| const T * | operator-> () const noexcept |
| T & | operator* () &noexcept |
| const T & | operator* () const &noexcept |
| const ErrorInfo & | error () const &noexcept |
| std::error_code | code () const noexcept |
| void | throw_if_error () const |
| template<class F > | |
| auto | and_then (F &&f) && |
| template<class F > | |
| auto | transform (F &&f) && |
| template<class F > | |
| Result | or_else (F &&f) && |
C++17 backport of the subset of std::expected<T, ErrorInfo> this library commits to. Uses std::optional<T> for storage so T need not be default-constructible. See docs/design/03 ยง3.5.
| using sshpp::Result< T >::value_type = T |
| using sshpp::Result< T >::error_type = ErrorInfo |
|
inline |
|
inline |
|
default |
|
defaultnoexcept |
|
default |
|
default |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |