pub enum Filter<'a, S: AsRef<str>> {
None,
By(TargetType, &'a [S]),
}Expand description
Filter based on TargetType and TargetValues as specified for various items.
Please note: This does only filter based on what is stored in the target field of an item
(e.g., ProgramContent::targets) and should not get interpreted by the server.
For example, setting the TargetType to ProgramName
will not filter based on the program_name
value but only consider what is stored in the targets
of that program.
Unfortunately, the specification is not very clear about this behavior, so some servers might interpret it differently. There has been some discussion with the authors of the standard in https://github.com/oadr3-org/openadr3-vtn-reference-implementation/issues/83 (sadly not public).
Variants§
None
Do not apply any filtering
By(TargetType, &'a [S])
Filter by TargetType and a list of values.
It will be encoded to the request as query parameters,
e.g., /programs?targetType=GROUP&targetValues=Group-1&targetValues=Group-2.