Struct pact_models::v4::async_message::AsynchronousMessage
source · pub struct AsynchronousMessage {
pub id: Option<String>,
pub key: Option<String>,
pub description: String,
pub provider_states: Vec<ProviderState>,
pub contents: MessageContents,
pub comments: HashMap<String, Value>,
pub pending: bool,
pub plugin_config: HashMap<String, HashMap<String, Value>>,
pub interaction_markup: InteractionMarkup,
pub transport: Option<String>,
}
Expand description
Asynchronous interactions as a sequence of messages
Fields§
§id: Option<String>
Interaction ID. This will only be set if the Pact file was fetched from a Pact Broker
key: Option<String>
Unique key for this interaction
description: String
A description for the interaction. Must be unique within the Pact file
provider_states: Vec<ProviderState>
Optional provider state for the interaction. See https://docs.pact.io/getting_started/provider_states for more info on provider states.
contents: MessageContents
The contents of the message
comments: HashMap<String, Value>
Annotations and comments associated with this interaction
pending: bool
If this interaction is pending. Pending interactions will never fail the build if they fail
plugin_config: HashMap<String, HashMap<String, Value>>
Configuration added by plugins
interaction_markup: InteractionMarkup
Text markup to use to render the interaction in a UI
transport: Option<String>
Transport mechanism used with this message
Implementations§
source§impl AsynchronousMessage
impl AsynchronousMessage
sourcepub fn with_key(&self) -> AsynchronousMessage
pub fn with_key(&self) -> AsynchronousMessage
Creates a new version with a calculated key
sourcepub fn message_content_type(&self) -> Option<ContentType>
pub fn message_content_type(&self) -> Option<ContentType>
Returns the content type of the message by returning the content type associated with the body, or by looking it up in the message metadata
Trait Implementations§
source§impl Clone for AsynchronousMessage
impl Clone for AsynchronousMessage
source§fn clone(&self) -> AsynchronousMessage
fn clone(&self) -> AsynchronousMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AsynchronousMessage
impl Debug for AsynchronousMessage
source§impl Default for AsynchronousMessage
impl Default for AsynchronousMessage
source§impl Display for AsynchronousMessage
impl Display for AsynchronousMessage
source§impl Hash for AsynchronousMessage
impl Hash for AsynchronousMessage
source§impl HttpPart for AsynchronousMessage
impl HttpPart for AsynchronousMessage
source§fn headers(&self) -> &Option<HashMap<String, Vec<String>>>
fn headers(&self) -> &Option<HashMap<String, Vec<String>>>
source§fn headers_mut(&mut self) -> &mut HashMap<String, Vec<String>>
fn headers_mut(&mut self) -> &mut HashMap<String, Vec<String>>
source§fn body(&self) -> &OptionalBody
fn body(&self) -> &OptionalBody
source§fn body_mut(&mut self) -> &mut OptionalBody
fn body_mut(&mut self) -> &mut OptionalBody
source§fn matching_rules(&self) -> &MatchingRules
fn matching_rules(&self) -> &MatchingRules
source§fn matching_rules_mut(&mut self) -> &mut MatchingRules
fn matching_rules_mut(&mut self) -> &mut MatchingRules
source§fn generators(&self) -> &Generators
fn generators(&self) -> &Generators
source§fn generators_mut(&mut self) -> &mut Generators
fn generators_mut(&mut self) -> &mut Generators
source§fn lookup_content_type(&self) -> Option<String>
fn lookup_content_type(&self) -> Option<String>
source§fn detect_content_type(&self) -> Option<ContentType>
fn detect_content_type(&self) -> Option<ContentType>
source§fn content_type(&self) -> Option<ContentType>
fn content_type(&self) -> Option<ContentType>
Content-Type
header is present, the
value of that header will be returned. Otherwise, the body will be inspected.source§fn has_header(&self, header_name: &str) -> bool
fn has_header(&self, header_name: &str) -> bool
source§fn lookup_header_value(&self, header_name: &str) -> Option<String>
fn lookup_header_value(&self, header_name: &str) -> Option<String>
source§fn has_text_body(&self) -> bool
fn has_text_body(&self) -> bool
source§fn build_generators(
&self,
category: &GeneratorCategory
) -> HashMap<DocPath, Generator>
fn build_generators( &self, category: &GeneratorCategory ) -> HashMap<DocPath, Generator>
source§impl Interaction for AsynchronousMessage
impl Interaction for AsynchronousMessage
source§fn is_request_response(&self) -> bool
fn is_request_response(&self) -> bool
source§fn as_request_response(&self) -> Option<RequestResponseInteraction>
fn as_request_response(&self) -> Option<RequestResponseInteraction>
source§fn is_message(&self) -> bool
fn is_message(&self) -> bool
source§fn as_message(&self) -> Option<Message>
fn as_message(&self) -> Option<Message>
source§fn id(&self) -> Option<String>
fn id(&self) -> Option<String>
source§fn description(&self) -> String
fn description(&self) -> String
source§fn set_description(&mut self, description: &str)
fn set_description(&mut self, description: &str)
source§fn provider_states(&self) -> Vec<ProviderState>
fn provider_states(&self) -> Vec<ProviderState>
<https://docs.pact.io/getting_started/provider_states>
for more info on provider states.source§fn provider_states_mut(&mut self) -> &mut Vec<ProviderState>
fn provider_states_mut(&mut self) -> &mut Vec<ProviderState>
<https://docs.pact.io/getting_started/provider_states>
for more info on provider states.source§fn contents(&self) -> OptionalBody
fn contents(&self) -> OptionalBody
source§fn contents_for_verification(&self) -> OptionalBody
fn contents_for_verification(&self) -> OptionalBody
source§fn content_type(&self) -> Option<ContentType>
fn content_type(&self) -> Option<ContentType>
Content-Type
header or metadata value is present, the
value of that value will be returned. Otherwise, the contents will be inspected.source§fn as_v4(&self) -> Option<Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>>
fn as_v4(&self) -> Option<Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>>
source§fn as_v4_mut(&mut self) -> Option<&mut dyn V4Interaction>
fn as_v4_mut(&mut self) -> Option<&mut dyn V4Interaction>
as_v4
method can convert to V4 format (via cloning the data).source§fn as_v4_http(&self) -> Option<SynchronousHttp>
fn as_v4_http(&self) -> Option<SynchronousHttp>
source§fn as_v4_async_message(&self) -> Option<AsynchronousMessage>
fn as_v4_async_message(&self) -> Option<AsynchronousMessage>
source§fn is_v4_async_message(&self) -> bool
fn is_v4_async_message(&self) -> bool
source§fn as_v4_sync_message(&self) -> Option<SynchronousMessage>
fn as_v4_sync_message(&self) -> Option<SynchronousMessage>
source§fn as_v4_http_mut(&mut self) -> Option<&mut SynchronousHttp>
fn as_v4_http_mut(&mut self) -> Option<&mut SynchronousHttp>
source§fn as_v4_async_message_mut(&mut self) -> Option<&mut AsynchronousMessage>
fn as_v4_async_message_mut(&mut self) -> Option<&mut AsynchronousMessage>
source§fn as_v4_sync_message_mut(&mut self) -> Option<&mut SynchronousMessage>
fn as_v4_sync_message_mut(&mut self) -> Option<&mut SynchronousMessage>
source§fn boxed(&self) -> Box<dyn Interaction + Send + Sync + RefUnwindSafe>
fn boxed(&self) -> Box<dyn Interaction + Send + Sync + RefUnwindSafe>
source§fn arced(&self) -> Arc<dyn Interaction + Send + Sync + RefUnwindSafe>
fn arced(&self) -> Arc<dyn Interaction + Send + Sync + RefUnwindSafe>
source§fn thread_safe(
&self
) -> Arc<Mutex<dyn Interaction + Send + Sync + RefUnwindSafe>>
fn thread_safe( &self ) -> Arc<Mutex<dyn Interaction + Send + Sync + RefUnwindSafe>>
source§fn matching_rules(&self) -> Option<MatchingRules>
fn matching_rules(&self) -> Option<MatchingRules>
source§fn is_v4_http(&self) -> bool
fn is_v4_http(&self) -> bool
source§fn is_v4_sync_message(&self) -> bool
fn is_v4_sync_message(&self) -> bool
source§impl PartialEq for AsynchronousMessage
impl PartialEq for AsynchronousMessage
source§impl V4Interaction for AsynchronousMessage
impl V4Interaction for AsynchronousMessage
source§fn to_super(&self) -> &(dyn Interaction + Send + Sync + RefUnwindSafe)
fn to_super(&self) -> &(dyn Interaction + Send + Sync + RefUnwindSafe)
source§fn to_super_mut(&mut self) -> &mut (dyn Interaction + Send + Sync)
fn to_super_mut(&mut self) -> &mut (dyn Interaction + Send + Sync)
source§fn boxed_v4(&self) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
fn boxed_v4(&self) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
source§fn comments(&self) -> HashMap<String, Value>
fn comments(&self) -> HashMap<String, Value>
source§fn comments_mut(&mut self) -> &mut HashMap<String, Value>
fn comments_mut(&mut self) -> &mut HashMap<String, Value>
source§fn v4_type(&self) -> V4InteractionType
fn v4_type(&self) -> V4InteractionType
source§fn plugin_config(&self) -> HashMap<String, HashMap<String, Value>>
fn plugin_config(&self) -> HashMap<String, HashMap<String, Value>>
source§fn plugin_config_mut(&mut self) -> &mut HashMap<String, HashMap<String, Value>>
fn plugin_config_mut(&mut self) -> &mut HashMap<String, HashMap<String, Value>>
source§fn interaction_markup(&self) -> InteractionMarkup
fn interaction_markup(&self) -> InteractionMarkup
source§fn interaction_markup_mut(&mut self) -> &mut InteractionMarkup
fn interaction_markup_mut(&mut self) -> &mut InteractionMarkup
source§fn set_transport(&mut self, transport: Option<String>)
fn set_transport(&mut self, transport: Option<String>)
source§fn with_unique_key(
&self
) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
fn with_unique_key( &self ) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
source§fn unique_key(&self) -> String
fn unique_key(&self) -> String
impl Eq for AsynchronousMessage
Auto Trait Implementations§
impl RefUnwindSafe for AsynchronousMessage
impl Send for AsynchronousMessage
impl Sync for AsynchronousMessage
impl Unpin for AsynchronousMessage
impl UnwindSafe for AsynchronousMessage
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.