Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::ResultSerialPort Struct Reference

SerialPort result retaining optional lower-level and native error details. More...

#include <SerialPortError.h>

Public Member Functions

constexpr ResultSerialPort (bool valid=true)
 
constexpr ResultSerialPort (SerialPortError error, SerialPortErrorDetail detail=SerialPortErrorDetail::None, uint32_t nativeError=0)
 
constexpr ResultSerialPort (Result result)
 
template<typename ResultLike >
constexpr ResultSerialPort (const ResultLike &other)
 
constexpr operator bool () const
 
constexpr operator Result () const
 
constexpr Result toResult () const
 
constexpr bool isError (SerialPortError error) const
 

Public Attributes

Result result
 
SerialPortErrorDetail detail = SerialPortErrorDetail::None
 
uint32_t nativeError = 0
 

Detailed Description

SerialPort result retaining optional lower-level and native error details.

nativeError is zero when unavailable or irrelevant. Converting to Result preserves the portable error identity and deliberately discards both detail fields.


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