Struct pact_plugin_driver::plugin_models::PactPlugin

source ·
pub struct PactPlugin {
    pub manifest: PactPluginManifest,
    pub child: Arc<ChildPluginProcess>,
    /* private fields */
}
Expand description

Running plugin details

Fields§

§manifest: PactPluginManifest

Manifest for this plugin

§child: Arc<ChildPluginProcess>

Running child process

Implementations§

source§

impl PactPlugin

source

pub fn new(manifest: &PactPluginManifest, child: ChildPluginProcess) -> Self

Create a new Plugin

source

pub fn port(&self) -> u16

Port the plugin is running on

source

pub fn kill(&self)

Kill the running plugin process

source

pub fn update_access(&mut self)

Update the access of the plugin

source

pub fn drop_access(&mut self) -> usize

Decrement and return the access count for the plugin

Trait Implementations§

source§

impl Clone for PactPlugin

source§

fn clone(&self) -> PactPlugin

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PactPlugin

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PactPluginRpc for PactPlugin

source§

fn init_plugin<'life0, 'async_trait>( &'life0 mut self, request: InitPluginRequest ) -> Pin<Box<dyn Future<Output = Result<InitPluginResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send an init request to the plugin process

source§

fn compare_contents<'life0, 'async_trait>( &'life0 self, request: CompareContentsRequest ) -> Pin<Box<dyn Future<Output = Result<CompareContentsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a compare contents request to the plugin process

source§

fn configure_interaction<'life0, 'async_trait>( &'life0 self, request: ConfigureInteractionRequest ) -> Pin<Box<dyn Future<Output = Result<ConfigureInteractionResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a configure contents request to the plugin process

source§

fn generate_content<'life0, 'async_trait>( &'life0 self, request: GenerateContentRequest ) -> Pin<Box<dyn Future<Output = Result<GenerateContentResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a generate content request to the plugin

source§

fn start_mock_server<'life0, 'async_trait>( &'life0 self, request: StartMockServerRequest ) -> Pin<Box<dyn Future<Output = Result<StartMockServerResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start a mock server
source§

fn shutdown_mock_server<'life0, 'async_trait>( &'life0 self, request: ShutdownMockServerRequest ) -> Pin<Box<dyn Future<Output = Result<ShutdownMockServerResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shutdown a running mock server
source§

fn get_mock_server_results<'life0, 'async_trait>( &'life0 self, request: MockServerRequest ) -> Pin<Box<dyn Future<Output = Result<MockServerResults>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the matching results from a running mock server
source§

fn prepare_interaction_for_verification<'life0, 'async_trait>( &'life0 self, request: VerificationPreparationRequest ) -> Pin<Box<dyn Future<Output = Result<VerificationPreparationResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prepare an interaction for verification. This should return any data required to construct any request so that it can be amended before the verification is run.
source§

fn verify_interaction<'life0, 'async_trait>( &'life0 self, request: VerifyInteractionRequest ) -> Pin<Box<dyn Future<Output = Result<VerifyInteractionResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the verification for the interaction.
source§

fn update_catalogue<'life0, 'async_trait>( &'life0 self, request: Catalogue ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Updates the catalogue. This will be sent when the core catalogue has been updated (probably by a plugin loading).

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more