Expand description
Support for matching and generating individual field/element values.
This is the field-level counterpart of crate::content: where a content matcher owns a whole
content type, a field matcher applies one matching rule to one value inside somebody else’s
content - a field in a JSON body, a header, a message metadata value. See proposal 006
(Field-level matchers and generators) for the design.
The proto types used here are the V2 interface ones. Field-level operations were introduced in V2 and have no V1 equivalent, so a V1 plugin cannot provide them.
Structs§
- Field
Context - Where a value sits and what is known about it, shared by matching and generation.
- Field
Generator - Generator for a single field/element value. See
FieldMatcher. - Field
Matcher - Matching rule for a single field/element value, provided by a plugin or by a handler the host
framework registered (see
crate::core_capabilities::CoreFieldMatcher).
Enums§
- Field
Value - A single value being matched or generated at the field/element level - the driver-side
counterpart of the proto
FieldValue. - Test
Mode - Which side of the test a generator is running on, mirroring
GenerateContentRequest.TestModein the plugin interface.
Functions§
- find_
field_ generator - Find the field-level generator with the given name. See
find_field_matcher. - find_
field_ matcher - Find the field-level matching rule with the given name. The name is resolved against the
catalogue the same way any other capability key is - see
crate::catalogue_manager::resolve_capability- socreditcardfinds a plugin’s own rule andtypefinds the corev2-typerule. Returns a descriptive error if the name matches nothing, matches more than one rule, or names something that is not a matching rule.