pub trait PactPluginRpc {
// Required methods
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
Expand description
Trait with remote-calling methods for a running plugin
Required Methods§
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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
Sourcefn 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,
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.
Sourcefn 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,
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.
Sourcefn 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,
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).