space::irbem::ContextResult
cheatah-space v0.1.0-alpha — Biome Standard 0.6.5-alpha
The outcome of a context build: a context, or the named reason there is none.
There is deliberately no default state and no public constructor. A struct of {optional<FieldContext>, ContextError} would have a value-initialized form carrying no context and no error — a success with nothing in it, which is exactly the sort of half-valid state this file exists to make unrepresentable. Both constructors here are private and each establishes the invariant that a context is present if and only if error is ContextError::None, so make_field_context is the only source of either half.
Functions
Whether a context was built.
Why no context was built.
the failure, or ContextError::None when one was built.
O(1).
none.
The context that was built.
a reference to it; it lives as long as this result does.
std::bad_optional_access | when the build failed — consult error first. |
O(1).
none.
ContextResult · 2 overloads
The success case.
built | the validated context. |
O(1).
none.
Constants & variables
The context, engaged only on success.
Why there is none; ContextError::None on success.
