ReadError Struct Reference

Space-ng SDK: sol3::core::SizeDelimitedLogReader::ReadError Struct Reference
Space-ng SDK
sol3::core::SizeDelimitedLogReader::ReadError Struct Reference

Read error details returned from readAtOffset() and iteration. More...

#include <sol3/core/size_delimited_log_reader.h>

Public Types

enum class  Code {
  kEndOfFile , kNotOpen , kTruncatedPrefix , kTruncatedBuffer ,
  kZeroSizeFrame
}
 

Public Attributes

Code code
 Error code describing the failure mode. More...
 
size_t offset = 0
 Byte offset used for the read attempt. More...
 
size_t size = 0
 Total mapped file size at the time of the read. More...
 
std::string path
 Log file path associated with the read, when available. More...
 

Detailed Description

Read error details returned from readAtOffset() and iteration.

Member Enumeration Documentation

◆ Code

Enumerator
kEndOfFile 

Requested offset is at or past the logical end of file.

kNotOpen 

File is not open or has been reset.

kTruncatedPrefix 

Size prefix is truncated (not enough bytes for uint32_t).

kTruncatedBuffer 

Payload or padding extends past the mapped file size.

kZeroSizeFrame 

Size prefix declares a zero-length payload.

Member Data Documentation

◆ code

Code sol3::core::SizeDelimitedLogReader::ReadError::code

Error code describing the failure mode.

◆ offset

size_t sol3::core::SizeDelimitedLogReader::ReadError::offset = 0

Byte offset used for the read attempt.

◆ path

std::string sol3::core::SizeDelimitedLogReader::ReadError::path

Log file path associated with the read, when available.

◆ size

size_t sol3::core::SizeDelimitedLogReader::ReadError::size = 0

Total mapped file size at the time of the read.


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