Type containing the string representation of a setting as well as the static metadata associated with it. Used as the "source" in setting conversion.

Synopsis

Declared in <folly/settings/Types.h>

struct SettingValueAndMetadata;

Member Functions

Name

Description

SettingValueAndMetadata [constructor]

Constructs a value and metadata pair from a string value and metadata.

Data Members

Name

Description

meta

The static metadata associated with the setting.

value

The string representation of the setting value.

Non-Member Functions

Name

Description

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.

to

Converts a setting value and metadata to type T, throwing on error.

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.

Created with MrDocs