Expand description
How the instances of a field combine, as a type-level marker on each FieldType.
The marker decides how a section may declare the field: a Singleton as Option<T>, or as T when it is required, and a List or Separate field as Vec<T>. Declaring one the wrong way is a compile-time error. The markers are the only combinations: the traits here cannot be implemented outside this crate.
Structs§
- List
- A field whose instances form one comma-separated list, as RFC 9110 section 5.3 combines them, such as
AcceptorCache-Control. - Separate
- A field whose instances are separate values that must not be combined, because a value can contain a comma, such as
Set-Cookieor an email’sReceived. - Singleton
- A field that appears at most once, such as
Content-LengthorContent-Type: a second instance is an error, even with the same value.
Traits§
- Combination
- One of the combination markers:
Singleton,List, orSeparate. - Multiple
Values - The combinations that collect several values:
ListandSeparate. - Single
Value - The combination of a field that appears at most once:
Singleton.