ReadOptions.this

Setting parameters in any order, leaving not mentioned ones in default state.

struct ReadOptions
@nogc @safe nothrow pure
this
(
Args...
)
(
Args args
)

Examples

ReadOptions readOptions;

readOptions = ReadOptions(No.preserveComments);
assert(readOptions.duplicateGroupPolicy == DuplicateGroupPolicy.throwError);
assert(readOptions.duplicateKeyPolicy == DuplicateKeyPolicy.throwError);
assert(!readOptions.preserveComments);

readOptions = ReadOptions(DuplicateGroupPolicy.skip, DuplicateKeyPolicy.preserve);
assert(readOptions.duplicateGroupPolicy == DuplicateGroupPolicy.skip);
assert(readOptions.duplicateKeyPolicy == DuplicateKeyPolicy.preserve);
assert(readOptions.preserveComments);

const duplicateGroupPolicy = DuplicateGroupPolicy.preserve;
immutable duplicateKeyPolicy = DuplicateKeyPolicy.skip;
const preserveComments = No.preserveComments;
readOptions = ReadOptions(duplicateGroupPolicy, IniLikeGroup.InvalidKeyPolicy.skip, preserveComments, duplicateKeyPolicy);
assert(readOptions.duplicateGroupPolicy == DuplicateGroupPolicy.preserve);
assert(readOptions.duplicateKeyPolicy == DuplicateKeyPolicy.skip);
assert(readOptions.invalidKeyPolicy == IniLikeGroup.InvalidKeyPolicy.skip);

Meta