Trait KernelHandleInner
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<(), RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn deactivate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn terminate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_envelope<'life0, 'async_trait>(
&'life0 self,
envelope: MessageEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn receive_timeout<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn try_receive(&self) -> Result<MessageEnvelope, RingKernelError>;
fn receive_correlated<'life0, 'async_trait>(
&'life0 self,
correlation: CorrelationId,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn status(&self) -> KernelStatus;
fn metrics(&self) -> KernelMetrics;
fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Inner trait for kernel handle implementation.
This is implemented by each backend to provide the actual functionality.
Required Methods§
fn kernel_id_num(&self) -> u64
fn kernel_id_num(&self) -> u64
Get numeric kernel ID.
fn current_timestamp(&self) -> HlcTimestamp
fn current_timestamp(&self) -> HlcTimestamp
Get current timestamp.
fn activate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn activate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Activate kernel.
fn deactivate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn deactivate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Deactivate kernel.
fn terminate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn terminate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Terminate kernel.
fn send_envelope<'life0, 'async_trait>(
&'life0 self,
envelope: MessageEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_envelope<'life0, 'async_trait>(
&'life0 self,
envelope: MessageEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Send message envelope.
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Receive message.
fn receive_timeout<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn receive_timeout<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<MessageEnvelope, RingKernelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Receive with timeout.
fn try_receive(&self) -> Result<MessageEnvelope, RingKernelError>
fn try_receive(&self) -> Result<MessageEnvelope, RingKernelError>
Try receive (non-blocking).
Receive correlated response.
fn status(&self) -> KernelStatus
fn status(&self) -> KernelStatus
Get status.
fn metrics(&self) -> KernelMetrics
fn metrics(&self) -> KernelMetrics
Get metrics.