ADS9324 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ads9324::Result< T > Struct Template Reference

The value of a call, or why there is none. More...

#include <ads9324_types.hpp>

Public Member Functions

constexpr bool ok () const noexcept
 
constexpr operator bool () const noexcept
 

Static Public Member Functions

static constexpr Result Success (T v) noexcept
 A successful result.
 
static constexpr Result Failure (Error e) noexcept
 A failed result.
 

Public Attributes

T value {}
 The value; T{} when the call failed.
 
Error error {Error::Ok}
 Error::Ok on success.
 

Detailed Description

template<typename T>
struct ads9324::Result< T >

The value of a call, or why there is none.

Check ok() (or the bool conversion) before reading value; on failure value is T{}.

Template Parameters
TThe value type. Result<void> carries only the error.

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