pub trait PluginHost:
Send
+ Sync
+ 'static {
// Required methods
fn log<'life0, 'async_trait>(
&'life0 self,
request: Request<LogMessage>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn compare_contents<'life0, 'async_trait>(
&'life0 self,
request: Request<HostCompareContentsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareContentsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn generate_content<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateContentRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateContentResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn match_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostMatchFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MatchFieldResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn generate_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateFieldResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with PluginHostServer.
Required Methods§
Sourcefn log<'life0, 'async_trait>(
&'life0 self,
request: Request<LogMessage>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log<'life0, 'async_trait>(
&'life0 self,
request: Request<LogMessage>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forward a structured log record from the plugin to the driver’s logging framework
Sourcefn compare_contents<'life0, 'async_trait>(
&'life0 self,
request: Request<HostCompareContentsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareContentsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn compare_contents<'life0, 'async_trait>(
&'life0 self,
request: Request<HostCompareContentsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareContentsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke a content matcher capability by catalogue entry key. The driver resolves the key to either a host-registered core handler or another running plugin. See proposal 007.
Sourcefn generate_content<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateContentRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateContentResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_content<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateContentRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateContentResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke a content generator capability by catalogue entry key. The driver resolves the key to either a host-registered core handler or another running plugin. See proposal 007.
Sourcefn match_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostMatchFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MatchFieldResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn match_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostMatchFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MatchFieldResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke a field-level matching rule by catalogue entry key, resolved the same way. This is how a plugin delegates one field of a document it owns to a standard Pact rule instead of reimplementing it. See proposals 006 and 009.
Sourcefn generate_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateFieldResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_field<'life0, 'async_trait>(
&'life0 self,
request: Request<HostGenerateFieldRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GenerateFieldResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke a field-level generator by catalogue entry key, resolved the same way. See proposals 006 and 009.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".