CANOPEN_CLIENT Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
canopen_client::Result< void > Struct Reference

The result of a call that returns no value. More...

#include <canopen_client_types.hpp>

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

Error error {Error::Ok}
 Error::Ok on success.
 

Detailed Description

The result of a call that returns no value.

Member Function Documentation

◆ Failure()

static constexpr Result canopen_client::Result< void >::Failure ( Error  e)
inlinestaticconstexprnoexcept

A failed result.

Parameters
eWhy it failed; never Error::Ok.
Returns
{e}.

◆ ok()

constexpr bool canopen_client::Result< void >::ok ( ) const
inlineconstexprnoexcept
Returns
true when the call succeeded.

◆ operator bool()

constexpr canopen_client::Result< void >::operator bool ( ) const
inlineexplicitconstexprnoexcept
Returns
true when the call succeeded.

◆ Success()

static constexpr Result canopen_client::Result< void >::Success ( )
inlinestaticconstexprnoexcept
Returns
A successful result.

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