STX  1.0.0
Functions
stx::internal::result Namespace Reference

Functions

template<typename Tp , typename Er >
Tp && unsafe_value_move (Result< Tp, Er > &)
 
template<typename Tp , typename Er >
Er && unsafe_err_move (Result< Tp, Er > &)
 
template<typename T >
STX_FORCE_INLINE void expect_value_failed (std::string_view const &msg, T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::expect() when no value is present More...
 
STX_FORCE_INLINE void expect_err_failed (std::string_view const &msg, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::expect_err() when a value is present More...
 
template<typename T >
STX_FORCE_INLINE void no_value (T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::unwrap() when no value is present More...
 
template<typename T >
STX_FORCE_INLINE void no_lref (T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::value() when no value is present More...
 
STX_FORCE_INLINE void no_err (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::unwrap_err() when a value is present More...
 
STX_FORCE_INLINE void no_err_lref (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::err_value() when no value is present More...
 

Function Documentation

◆ expect_err_failed()

STX_FORCE_INLINE void stx::internal::result::expect_err_failed ( std::string_view const &  msg,
SourceLocation const &  location = SourceLocation::current() 
)
noexcept

panic helper for Result<T, E>::expect_err() when a value is present

◆ expect_value_failed()

template<typename T >
STX_FORCE_INLINE void stx::internal::result::expect_value_failed ( std::string_view const &  msg,
T const &  err,
SourceLocation const &  location = SourceLocation::current() 
)
noexcept

panic helper for Result<T, E>::expect() when no value is present

◆ no_err()

STX_FORCE_INLINE void stx::internal::result::no_err ( SourceLocation const &  location = SourceLocation::current())
noexcept

panic helper for Result<T, E>::unwrap_err() when a value is present

◆ no_err_lref()

STX_FORCE_INLINE void stx::internal::result::no_err_lref ( SourceLocation const &  location = SourceLocation::current())
noexcept

panic helper for Result<T, E>::err_value() when no value is present

◆ no_lref()

template<typename T >
STX_FORCE_INLINE void stx::internal::result::no_lref ( T const &  err,
SourceLocation const &  location = SourceLocation::current() 
)
noexcept

panic helper for Result<T, E>::value() when no value is present

◆ no_value()

template<typename T >
STX_FORCE_INLINE void stx::internal::result::no_value ( T const &  err,
SourceLocation const &  location = SourceLocation::current() 
)
noexcept

panic helper for Result<T, E>::unwrap() when no value is present

◆ unsafe_err_move()

template<typename Tp , typename Er >
Er&& stx::internal::result::unsafe_err_move ( Result< Tp, Er > &  )
inline

◆ unsafe_value_move()

template<typename Tp , typename Er >
Tp&& stx::internal::result::unsafe_value_move ( Result< Tp, Er > &  )
inline