pub struct NullLifecycleHandler;Expand description
A default implementation of LifecycleHandler that does nothing in response to lifecycle events.
Trait Implementations§
Source§impl LifecycleHandler for NullLifecycleHandler
impl LifecycleHandler for NullLifecycleHandler
Source§fn send_to_new_process<'life0, 'async_trait>(
&'life0 mut self,
_write_pipe: PipeWriter,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_to_new_process<'life0, 'async_trait>(
&'life0 mut self,
_write_pipe: PipeWriter,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called after the child process has been spawned, allowing the current process to send state
to the child process. The child process can receive this data by calling
receive_from_old_process.Source§fn pre_new_process<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pre_new_process<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called before the child process has been spawned.
Source§fn new_process_failed<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_process_failed<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called after
send_to_new_process if the child process fails to start successfully.
This gives you an opportunity to undo any state changes made in send_to_new_process.Auto Trait Implementations§
impl Freeze for NullLifecycleHandler
impl RefUnwindSafe for NullLifecycleHandler
impl Send for NullLifecycleHandler
impl Sync for NullLifecycleHandler
impl Unpin for NullLifecycleHandler
impl UnwindSafe for NullLifecycleHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more