pub trait MessageProcessor: Send + Sync {
// Required method
fn process_message<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Option<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn process_batch<'life0, 'async_trait>(
&'life0 self,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Vec<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn supports_batching(&self) -> bool { ... }
fn get_capabilities(&self) -> ProcessorCapabilities { ... }
}Expand description
Trait for processing JSON-RPC messages
Required Methods§
Provided Methods§
Sourcefn process_batch<'life0, 'async_trait>(
&'life0 self,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Vec<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_batch<'life0, 'async_trait>(
&'life0 self,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Vec<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a batch of JSON-RPC messages
Sourcefn supports_batching(&self) -> bool
fn supports_batching(&self) -> bool
Check if batch processing is supported
Sourcefn get_capabilities(&self) -> ProcessorCapabilities
fn get_capabilities(&self) -> ProcessorCapabilities
Get processor capabilities