Skip to main content

SingBoxChildProcess

Trait SingBoxChildProcess 

Source
pub trait SingBoxChildProcess: Send {
    // Required methods
    fn pid(&self) -> u32;
    fn poll<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<SingBoxChildPoll, PortError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn terminate<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), PortError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The owned child process of a running sing-box core.

Required Methods§

Source

fn pid(&self) -> u32

Returns the process id of the child.

Source

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

Polls whether the child is still running.

Source

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

Terminates the child and waits for its exit.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§