pub trait CoreFieldGenerator: Send + Sync {
// Required method
fn generate_field<'life0, 'async_trait>(
&'life0 self,
request: GenerateFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<GenerateFieldResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A host-provided handler for the GenerateField capability shape - one of the standard Pact
generators applied to a single value. Implemented by the embedding Pact framework and registered
via register_core_field_generator. See CoreFieldMatcher.
Required Methods§
Sourcefn generate_field<'life0, 'async_trait>(
&'life0 self,
request: GenerateFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<GenerateFieldResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_field<'life0, 'async_trait>(
&'life0 self,
request: GenerateFieldRequest,
) -> Pin<Box<dyn Future<Output = Result<GenerateFieldResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate a single value, replacing the example value from the Pact interaction.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".