Outcome of a feed call.
More...
#include <sofab.hpp>
Outcome of a feed call.
Convertible to bool (true on success) and comparable to Error.
Definition at line 2297 of file sofab.hpp.
◆ code()
| Error sofab::IStreamImpl::Result::code |
( |
| ) |
const |
|
inlinenoexcept |
◆ incomplete()
| bool sofab::IStreamImpl::Result::incomplete |
( |
| ) |
const |
|
inlinenoexcept |
True if the consumed bytes end mid-field or with an open sequence: a valid but partial decode (Error::Incomplete). Not an error — the caller owns end-of-input and may feed more bytes to continue. Distinct from both ok() and a decode error.
Definition at line 2346 of file sofab.hpp.
◆ invalid()
| bool sofab::IStreamImpl::Result::invalid |
( |
| ) |
const |
|
inlinenoexcept |
True if the bytes are malformed (Error::InvalidMessage). Deliberately false for limitExceeded(): a receiver limit is a policy rejection on well-formed bytes (§6.2.1/§6.3), and the two must stay distinguishable to the caller.
Definition at line 2355 of file sofab.hpp.
◆ limitExceeded()
| bool sofab::IStreamImpl::Result::limitExceeded |
( |
| ) |
const |
|
inlinenoexcept |
True if a configured receiver limit was exceeded on a schema-unbounded field (Error::LimitExceeded, §6.2.1).
Means *"raise my limit, or the sender must send less"* — the same bytes decode on a receiver configured more loosely. Terminal, like invalid(), but never the same answer.
Definition at line 2366 of file sofab.hpp.
◆ ok()
| bool sofab::IStreamImpl::Result::ok |
( |
| ) |
const |
|
inlinenoexcept |
True if the consumed bytes end exactly on a field boundary (a complete message so far). False for both a partial decode (incomplete()) and a genuine decode error.
Definition at line 2337 of file sofab.hpp.
◆ operator bool()
| sofab::IStreamImpl::Result::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
True if the feed reached a complete message boundary (same as ok()). An Error::Incomplete partial decode is neither complete nor an error, so this is false — use incomplete() to tell it apart from a genuine error.
Definition at line 2317 of file sofab.hpp.
◆ operator!=()
| bool sofab::IStreamImpl::Result::operator!= |
( |
Error |
e | ) |
const |
|
inlinenoexcept |
◆ operator==()
| bool sofab::IStreamImpl::Result::operator== |
( |
Error |
e | ) |
const |
|
inlinenoexcept |
Compare the held error code to e.
Definition at line 2323 of file sofab.hpp.
◆ IStreamImpl
The documentation for this class was generated from the following file: