pub trait CoreFieldMatcher: Send + Sync {
// Required method
fn match_field<'life0, 'async_trait>(
&'life0 self,
request: MatchFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<MatchFieldResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A host-provided handler for the MatchField capability shape - one of the standard Pact
matching rules applied to a single value. Implemented by the embedding Pact framework and
registered via register_core_field_matcher. See proposals 006 (Field-level matchers and
generators) and 009 (Host-provided core matching and generation).
The request and response are the V2 interface types: field-level operations were introduced in V2 and have no V1 equivalent.
Required Methods§
Sourcefn match_field<'life0, 'async_trait>(
&'life0 self,
request: MatchFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<MatchFieldResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn match_field<'life0, 'async_trait>(
&'life0 self,
request: MatchFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<MatchFieldResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Apply the matching rule to a single value, returning any mismatches.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".