KernelHandleInner

Trait KernelHandleInner 

Source
pub trait KernelHandleInner: Send + Sync {
Show 13 methods // Required methods fn kernel_id_num(&self) -> u64; fn current_timestamp(&self) -> HlcTimestamp; fn activate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn deactivate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn terminate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn send_envelope<'life0, 'async_trait>( &'life0 self, envelope: MessageEnvelope, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn receive<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn receive_timeout<'life0, 'async_trait>( &'life0 self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn try_receive(&self) -> Result<MessageEnvelope>; fn receive_correlated<'life0, 'async_trait>( &'life0 self, correlation: CorrelationId, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn status(&self) -> KernelStatus; fn metrics(&self) -> KernelMetrics; fn wait<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Inner trait for kernel handle implementation.

This is implemented by each backend to provide the actual functionality.

Required Methods§

Source

fn kernel_id_num(&self) -> u64

Get numeric kernel ID.

Source

fn current_timestamp(&self) -> HlcTimestamp

Get current timestamp.

Source

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

Activate kernel.

Source

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

Deactivate kernel.

Source

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

Terminate kernel.

Source

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

Send message envelope.

Source

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

Receive message.

Source

fn receive_timeout<'life0, 'async_trait>( &'life0 self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive with timeout.

Source

fn try_receive(&self) -> Result<MessageEnvelope>

Try receive (non-blocking).

Source

fn receive_correlated<'life0, 'async_trait>( &'life0 self, correlation: CorrelationId, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive correlated response.

Source

fn status(&self) -> KernelStatus

Get status.

Source

fn metrics(&self) -> KernelMetrics

Get metrics.

Source

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

Wait for termination.

Implementors§