The util::Expected class provides a standard way for low‐level functions to return either error values or result values.
Synopsis
Declared in <util/expected.h>
template<
class T,
class E>
class Expected;
Description
It provides a smaller version of std::expected from C++23. Missing features can be added, if needed.
Member Functions
Name |
Description |
|
Constructors |
Access the stored error (undefined behavior if a value is held). |
|
Test whether a result value is held. |
|
Access the result value without checking. |
|
Access members of the result value. |
|
Swap contents with another Expected. |
|
Access the result value, throwing if an error is held. |
|
Return the result value, or a fallback when an error is held. |
|
Test whether a result value is held. |
Specializations
Name |
Non-Member Functions
Name |
Description |
Return the estimation carried by a fee rate estimate result: the successful estimation, or the error's zero‐value estimation. |
|
Parse a single key path element like "0", "0'", or "0h". Returns the derivation index and hardened status, or an error message. |
|
Signs a PSBTInput, verifying that all provided data matches what is being signed. |
|
Export the descriptors from a wallet so that they can be imported elsewhere |
Created with MrDocs