Struct pact_plugin_driver::content::ContentGenerator
source · pub struct ContentGenerator {
pub catalogue_entry: CatalogueEntry,
}
Expand description
Generator for contents based on content type
Fields§
§catalogue_entry: CatalogueEntry
Catalogue entry for this content matcher
Implementations§
source§impl ContentGenerator
impl ContentGenerator
sourcepub fn catalogue_entry_key(&self) -> String
pub fn catalogue_entry_key(&self) -> String
Catalogue entry key for this generator
sourcepub fn plugin_name(&self) -> String
pub fn plugin_name(&self) -> String
Plugin name that provides this matcher
sourcepub async fn generate_content(
&self,
content_type: &ContentType,
generators: &HashMap<String, Generator>,
body: &OptionalBody,
plugin_data: &Vec<PluginData>,
interaction_data: &HashMap<String, HashMap<String, Value>>,
context: &HashMap<&str, Value>
) -> Result<OptionalBody>
pub async fn generate_content(
&self,
content_type: &ContentType,
generators: &HashMap<String, Generator>,
body: &OptionalBody,
plugin_data: &Vec<PluginData>,
interaction_data: &HashMap<String, HashMap<String, Value>>,
context: &HashMap<&str, Value>
) -> Result<OptionalBody>
Generate the content for the given content type and body
Trait Implementations§
source§impl Clone for ContentGenerator
impl Clone for ContentGenerator
source§fn clone(&self) -> ContentGenerator
fn clone(&self) -> ContentGenerator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ContentGenerator
impl Send for ContentGenerator
impl Sync for ContentGenerator
impl Unpin for ContentGenerator
impl UnwindSafe for ContentGenerator
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request