class result
Declaration
template <class ValueType, class ErrorType>
class result { /* full declaration omitted */ };
Description
A monadic type that container either a normal value or an error.
Declared at: libreglisse/result.hpp:136
Member Variables
- private bool m_is_ok
- private anonymous struct / union
Method Overview
- public constexpr auto borrow() const & -> const reglisse::result::value_type &
- public constexpr auto borrow() & -> reglisse::result::value_type &
- public constexpr auto borrow_err() & -> reglisse::result::error_type &
- public constexpr auto borrow_err() const & -> const reglisse::result::error_type &
- public constexpr auto is_err() const noexcept -> bool
- public constexpr auto is_ok() const noexcept -> bool
- public constexpr bool operator bool() const noexcept
- public constexpr result<ValueType, ErrorType>(ok<reglisse::result::value_type> && value)
- public constexpr result<ValueType, ErrorType>(result<ValueType, ErrorType> && other) noexcept
- public constexpr result<ValueType, ErrorType>(const result<ValueType, ErrorType> & other)
- public constexpr result<ValueType, ErrorType>(err<reglisse::result::error_type> && error)
- public constexpr result<ValueType, ErrorType>()
- public constexpr auto take() const && -> reglisse::result::value_type
- public constexpr auto take() && -> reglisse::result::value_type
- public constexpr auto take_err() const && -> reglisse::result::error_type
- public constexpr auto take_err() && -> reglisse::result::error_type
- public template <class U>constexpr auto take_err_or(U && other) const && -> reglisse::result::error_type
- public template <class U>constexpr auto take_err_or(U && other) && -> reglisse::result::error_type
- public template <class U>constexpr auto take_or(U && other) const && -> reglisse::result::value_type
- public template <class U>constexpr auto take_or(U && other) && -> reglisse::result::value_type
- public constexpr ~result<ValueType, ErrorType>()
Methods
constexpr auto borrow()
const& -> const reglisse::result::value_type&
constexpr auto borrow()
const& -> const reglisse::result::value_type&
Declared at: libreglisse/result.hpp:246
constexpr auto
borrow() & -> reglisse::result::value_type&
constexpr auto
borrow() & -> reglisse::result::value_type&
Declared at: libreglisse/result.hpp:252
constexpr auto
borrow_err() & -> reglisse::result::error_type&
constexpr auto
borrow_err() & -> reglisse::result::error_type&
Declared at: libreglisse/result.hpp:298
constexpr auto borrow_err()
const& -> const reglisse::result::error_type&
constexpr auto borrow_err()
const& -> const reglisse::result::error_type&
Declared at: libreglisse/result.hpp:292
constexpr auto is_err() const noexcept -> bool
constexpr auto is_err() const noexcept -> bool
Declared at: libreglisse/result.hpp:339
constexpr auto is_ok() const noexcept -> bool
constexpr auto is_ok() const noexcept -> bool
Declared at: libreglisse/result.hpp:338
constexpr bool operator bool() const noexcept
constexpr bool operator bool() const noexcept
Declared at: libreglisse/result.hpp:340
constexpr result<ValueType, ErrorType>(
ok<reglisse::result::value_type>&& value)
constexpr result<ValueType, ErrorType>(
ok<reglisse::result::value_type>&& value)
Declared at: libreglisse/result.hpp:149
Parameters
- ok<reglisse::result::value_type>&& value
constexpr result<ValueType, ErrorType>(
result<ValueType, ErrorType>&& other) noexcept
constexpr result<ValueType, ErrorType>(
result<ValueType, ErrorType>&& other) noexcept
Declared at: libreglisse/result.hpp:168
Parameters
- result<ValueType, ErrorType>&& other
constexpr result<ValueType, ErrorType>(
const result<ValueType, ErrorType>& other)
constexpr result<ValueType, ErrorType>(
const result<ValueType, ErrorType>& other)
Declared at: libreglisse/result.hpp:157
Parameters
- const result<ValueType, ErrorType>& other
constexpr result<ValueType, ErrorType>(
err<reglisse::result::error_type>&& error)
constexpr result<ValueType, ErrorType>(
err<reglisse::result::error_type>&& error)
Declared at: libreglisse/result.hpp:153
Parameters
- err<reglisse::result::error_type>&& error
constexpr result<ValueType, ErrorType>()
constexpr result<ValueType, ErrorType>()
Declared at: libreglisse/result.hpp:148
constexpr auto take()
const&& -> reglisse::result::value_type
constexpr auto take()
const&& -> reglisse::result::value_type
Declared at: libreglisse/result.hpp:258
constexpr auto
take() && -> reglisse::result::value_type
constexpr auto
take() && -> reglisse::result::value_type
Declared at: libreglisse/result.hpp:264
constexpr auto take_err()
const&& -> reglisse::result::error_type
constexpr auto take_err()
const&& -> reglisse::result::error_type
Declared at: libreglisse/result.hpp:304
constexpr auto
take_err() && -> reglisse::result::error_type
constexpr auto
take_err() && -> reglisse::result::error_type
Declared at: libreglisse/result.hpp:310
template <class U>
constexpr auto take_err_or(U&& other)
const&& -> reglisse::result::error_type
template <class U>
constexpr auto take_err_or(U&& other)
const&& -> reglisse::result::error_type
Declared at: libreglisse/result.hpp:318
Parameters
- U&& other
template <class U>
constexpr auto take_err_or(
U&& other) && -> reglisse::result::error_type
template <class U>
constexpr auto take_err_or(
U&& other) && -> reglisse::result::error_type
Declared at: libreglisse/result.hpp:328
Parameters
- U&& other
template <class U>
constexpr auto take_or(U&& other)
const&& -> reglisse::result::value_type
template <class U>
constexpr auto take_or(U&& other)
const&& -> reglisse::result::value_type
Declared at: libreglisse/result.hpp:272
Parameters
- U&& other
template <class U>
constexpr auto take_or(
U&& other) && -> reglisse::result::value_type
template <class U>
constexpr auto take_or(
U&& other) && -> reglisse::result::value_type
Declared at: libreglisse/result.hpp:282
Parameters
- U&& other
constexpr ~result<ValueType, ErrorType>()
constexpr ~result<ValueType, ErrorType>()
Declared at: libreglisse/result.hpp:179