pub trait PlatformAdapter: Send + Sync {
// Required methods
fn platform(&self) -> Platform;
fn spawn<'life0, 'async_trait>(
&'life0 self,
daemon: Box<dyn Daemon>,
) -> Pin<Box<dyn Future<Output = Result<DaemonHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn signal<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
sig: Signal,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<DaemonStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn attach_tracer<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<TracerHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Platform-specific daemon adapter.
Each platform implements this trait to provide daemon lifecycle management in a platform-appropriate way.
Required Methods§
Sourcefn spawn<'life0, 'async_trait>(
&'life0 self,
daemon: Box<dyn Daemon>,
) -> Pin<Box<dyn Future<Output = Result<DaemonHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn spawn<'life0, 'async_trait>(
&'life0 self,
daemon: Box<dyn Daemon>,
) -> Pin<Box<dyn Future<Output = Result<DaemonHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn signal<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
sig: Signal,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn signal<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
sig: Signal,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn status<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<DaemonStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<DaemonStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn attach_tracer<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<TracerHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn attach_tracer<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 DaemonHandle,
) -> Pin<Box<dyn Future<Output = Result<TracerHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attaches a tracer to a daemon (renacer integration).
§Errors
Returns an error if tracer attachment fails.