Trait pact_models::v4::interaction::V4Interaction
source · pub trait V4Interaction: Interaction + Send + Sync {
Show 16 methods
// Required methods
fn to_json(&self) -> Value;
fn to_super(&self) -> &(dyn Interaction + Send + Sync + RefUnwindSafe);
fn to_super_mut(&mut self) -> &mut (dyn Interaction + Send + Sync);
fn key(&self) -> Option<String>;
fn boxed_v4(&self) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>;
fn comments(&self) -> HashMap<String, Value>;
fn comments_mut(&mut self) -> &mut HashMap<String, Value>;
fn v4_type(&self) -> V4InteractionType;
fn plugin_config(&self) -> HashMap<String, HashMap<String, Value>>;
fn plugin_config_mut(
&mut self
) -> &mut HashMap<String, HashMap<String, Value>>;
fn interaction_markup(&self) -> InteractionMarkup;
fn interaction_markup_mut(&mut self) -> &mut InteractionMarkup;
fn transport(&self) -> Option<String>;
fn set_transport(&mut self, transport: Option<String>);
fn with_unique_key(
&self
) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>;
fn unique_key(&self) -> String;
}
Expand description
V4 Interaction trait
Required Methods§
sourcefn to_super(&self) -> &(dyn Interaction + Send + Sync + RefUnwindSafe)
fn to_super(&self) -> &(dyn Interaction + Send + Sync + RefUnwindSafe)
Convert the interaction to its super trait
sourcefn to_super_mut(&mut self) -> &mut (dyn Interaction + Send + Sync)
fn to_super_mut(&mut self) -> &mut (dyn Interaction + Send + Sync)
Convert the interaction to its super trait
sourcefn boxed_v4(&self) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
fn boxed_v4(&self) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
Clones this interaction and wraps it in a box
sourcefn comments(&self) -> HashMap<String, Value>
fn comments(&self) -> HashMap<String, Value>
Annotations and comments associated with this interaction
sourcefn comments_mut(&mut self) -> &mut HashMap<String, Value>
fn comments_mut(&mut self) -> &mut HashMap<String, Value>
Mutable access to the annotations and comments associated with this interaction
sourcefn v4_type(&self) -> V4InteractionType
fn v4_type(&self) -> V4InteractionType
Type of this V4 interaction
sourcefn plugin_config(&self) -> HashMap<String, HashMap<String, Value>>
fn plugin_config(&self) -> HashMap<String, HashMap<String, Value>>
Any configuration added to the interaction from a plugin
sourcefn plugin_config_mut(&mut self) -> &mut HashMap<String, HashMap<String, Value>>
fn plugin_config_mut(&mut self) -> &mut HashMap<String, HashMap<String, Value>>
Any configuration added to the interaction from a plugin
sourcefn interaction_markup(&self) -> InteractionMarkup
fn interaction_markup(&self) -> InteractionMarkup
Markup added to the interaction to render in UIs
sourcefn interaction_markup_mut(&mut self) -> &mut InteractionMarkup
fn interaction_markup_mut(&mut self) -> &mut InteractionMarkup
Markup added to the interaction to render in UIs
sourcefn set_transport(&mut self, transport: Option<String>)
fn set_transport(&mut self, transport: Option<String>)
Set the transport used with the interaction
sourcefn with_unique_key(
&self
) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
fn with_unique_key( &self ) -> Box<dyn V4Interaction + Send + Sync + RefUnwindSafe>
Creates a new version with a calculated key
sourcefn unique_key(&self) -> String
fn unique_key(&self) -> String
Returns the current key if set, otherwise calculates a new one