get_pointer | Returns a pointer to the value of an Expected, or null on error. |
get_pointer | Returns a pointer to the value of an Expected, or null on error. |
makeExpected | For constructing an Expected object from a value, with the specified Error type. Usage is as follows: |
operator co_await | Enables co_await on an Expected to unwrap its value or propagate its error. |
operator!= | Deleted: comparing an Expected with a bare value is not allowed. |
operator!= | Compares two Expected values for inequality. |
operator< | Deleted: comparing an Expected with a bare value is not allowed. |
operator< | Orders two Expected values, treating errors as less than values. |
operator<= | Deleted: comparing an Expected with a bare value is not allowed. |
operator<= | Orders two Expected values. |
operator== | Deleted: comparing an Expected with a bare value is not allowed. |
operator== | Compares two Expected values for equality. |
operator> | Orders two Expected values. |
operator> | Deleted: comparing an Expected with a bare value is not allowed. |
operator>= | Orders two Expected values. |
operator>= | Deleted: comparing an Expected with a bare value is not allowed. |
parseTo | Parse a StringPiece into a std::string_view, consuming all input. |
parseTo | Parse a StringPiece into a std::string, consuming all input. |
parseTo | Parsing strings to numeric types. |
parseTo | Parse a StringPiece into any folly string type, consuming all input. |
parseTo | Parse a StringPiece into a StringPiece (identity, consuming all input). |
parseTo | Parse a StringPiece into an fbstring, consuming all input. |
parseTo | Custom Conversions |
swap | swap Expected values |
tryDecodeVarint | A variant of decodeVarint() that does not throw on error. Useful in contexts where only part of a serialized varint may be attempted to be decoded, e.g., when a serialized varint arrives on the boundary of a network packet. |
trySplitTo | Try to split a string into a fixed number of fields by delimiter, using folly::tryTo<> for conversions. types by delimiter. - On success, all output values will be initialized and the 'Unit{}' value is returned. Arguments are assigned in reverse order. - On failure, the first failing 'ConversionCode' is returned with its associated substring in a 'SubstringConversionCode'. - String splitting is performed prior to each conversion; field values will not contain the delimiter. - All custom error codes are mapped to ConversionCode::CUSTOM. |
tryTo | tryTo/to that take the strings by pointer so the caller gets information about how much of the string was consumed by the conversion. These do not check for trailing whitespace. |
tryTo | String or StringPiece to target conversion. Accepts leading and trailing whitespace, but no non-space trailing characters. |
tryTo | Checked conversion from any type to an enum, returning an Expected. |
tryTo | std::chrono::duration to struct timeval |
tryTo | struct timespec to std::chrono::duration |
tryTo | struct timeval to std::chrono::duration |
tryTo | Checked conversion between arithmetic types, returning an Expected. |
tryTo | Enum to anything and back |
tryTo | timespec or timeval to std::chrono::time_point |
tryTo | Unchecked conversion from arithmetic to boolean. This is different from the other arithmetic conversions because we use the C convention of treating any non-zero value as true, instead of range checking. |
tryTo | overloadbrief to, but return an Expected |
tryTo | std::chrono::time_point to timespec or timeval |
tryTo | std::chrono::duration to struct timespec |
tryTo | String represented as a pair of pointers to char to unsigned integrals. Assumes NO whitespace before or after. |
settings::convertTo | Like parseTo in folly/Conv.h, but the "source" is SettingValueAndMetadata instead of a StringPiece. Defaults to folly::tryTo<T>(StringPiece) but can be overridden using ADL for user defined types. |
settings::tryTo | Conversion functions for converting a SettingValueAndMetadata to a setting type T. Implementation is similar to folly/Conv and allows for customization using the convertTo function above. |