Struct pact_plugin_driver::proto::GenerateContentRequest
source · pub struct GenerateContentRequest {
pub contents: Option<Body>,
pub generators: HashMap<String, Generator>,
pub plugin_configuration: Option<PluginConfiguration>,
pub test_context: Option<Struct>,
pub test_mode: i32,
pub content_for: i32,
}
Expand description
Request to generate the contents using any defined generators
Fields§
§contents: Option<Body>
Original contents
generators: HashMap<String, Generator>
Generators to apply
plugin_configuration: Option<PluginConfiguration>
Additional data added to the Pact/Interaction by the plugin
test_context: Option<Struct>
Context data provided by the test framework
test_mode: i32
§content_for: i32
Implementations§
source§impl GenerateContentRequest
impl GenerateContentRequest
sourcepub fn test_mode(&self) -> TestMode
pub fn test_mode(&self) -> TestMode
Returns the enum value of test_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_test_mode(&mut self, value: TestMode)
pub fn set_test_mode(&mut self, value: TestMode)
Sets test_mode
to the provided enum value.
sourcepub fn content_for(&self) -> ContentFor
pub fn content_for(&self) -> ContentFor
Returns the enum value of content_for
, or the default if the field is set to an invalid enum value.
sourcepub fn set_content_for(&mut self, value: ContentFor)
pub fn set_content_for(&mut self, value: ContentFor)
Sets content_for
to the provided enum value.
Trait Implementations§
source§impl Clone for GenerateContentRequest
impl Clone for GenerateContentRequest
source§fn clone(&self) -> GenerateContentRequest
fn clone(&self) -> GenerateContentRequest
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 moresource§impl Debug for GenerateContentRequest
impl Debug for GenerateContentRequest
source§impl Default for GenerateContentRequest
impl Default for GenerateContentRequest
source§impl Message for GenerateContentRequest
impl Message for GenerateContentRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for GenerateContentRequest
impl PartialEq for GenerateContentRequest
source§fn eq(&self, other: &GenerateContentRequest) -> bool
fn eq(&self, other: &GenerateContentRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GenerateContentRequest
Auto Trait Implementations§
impl Freeze for GenerateContentRequest
impl RefUnwindSafe for GenerateContentRequest
impl Send for GenerateContentRequest
impl Sync for GenerateContentRequest
impl Unpin for GenerateContentRequest
impl UnwindSafe for GenerateContentRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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