pub struct SynchronousHttp {
pub id: Option<String>,
pub key: Option<String>,
pub description: String,
pub provider_states: Vec<ProviderState>,
pub request: HttpRequest,
pub response: HttpResponse,
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
V4 HTTP Interaction Type
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: StringA description for the interaction. Must be unique within the Pact file
provider_states: Vec<ProviderState>Optional provider states for the interaction.
See <https://docs.pact.io/getting_started/provider_states> for more info on provider states.
request: HttpRequestRequest of the interaction
response: HttpResponseResponse of the interaction
comments: HashMap<String, Value>Annotations and comments associated with this interaction
pending: boolIf 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: InteractionMarkupText markup to use to render the interaction in a UI
transport: Option<String>Transport mechanism used with this request and response
Implementations§
Source§impl SynchronousHttp
impl SynchronousHttp
Sourcepub fn with_key(&self) -> SynchronousHttp
pub fn with_key(&self) -> SynchronousHttp
Creates a new version with a calculated key
Trait Implementations§
Source§impl Clone for SynchronousHttp
impl Clone for SynchronousHttp
Source§fn clone(&self) -> SynchronousHttp
fn clone(&self) -> SynchronousHttp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SynchronousHttp
impl Debug for SynchronousHttp
Source§impl Default for SynchronousHttp
impl Default for SynchronousHttp
Source§impl Display for SynchronousHttp
impl Display for SynchronousHttp
Source§impl Hash for SynchronousHttp
impl Hash for SynchronousHttp
Source§impl Interaction for SynchronousHttp
impl Interaction for SynchronousHttp
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 is_v4_http(&self) -> bool
fn is_v4_http(&self) -> bool
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 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_async_message(&self) -> bool
fn is_v4_async_message(&self) -> bool
Source§fn is_v4_sync_message(&self) -> bool
fn is_v4_sync_message(&self) -> bool
Source§impl PartialEq for SynchronousHttp
impl PartialEq for SynchronousHttp
Source§impl V4Interaction for SynchronousHttp
impl V4Interaction for SynchronousHttp
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 SynchronousHttp
Auto Trait Implementations§
impl !Freeze for SynchronousHttp
impl RefUnwindSafe for SynchronousHttp
impl Send for SynchronousHttp
impl Sync for SynchronousHttp
impl Unpin for SynchronousHttp
impl UnwindSafe for SynchronousHttp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.