Skip to main content

EnginePlatformExt

Trait EnginePlatformExt 

Source
pub trait EnginePlatformExt<P, R>: Send + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
    fn dispatch_op<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        engine: &'life1 mut Engine<P, R>,
        op: Op,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_shutdown<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Tui/desktop hooks invoked from the core op loop.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Source

fn dispatch_op<'life0, 'life1, 'async_trait>( &'life0 mut self, engine: &'life1 mut Engine<P, R>, op: Op, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dispatch an engine operation that requires platform-specific handling.

Source

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

Shutdown hook after the op receiver closes (e.g. MCP pool teardown).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§