pub struct RestartSupervisor { /* private fields */ }Implementations§
Source§impl RestartSupervisor
impl RestartSupervisor
pub fn new(current: Child) -> Self
pub fn current_id(&self) -> u32
pub fn current_is_running(&mut self) -> Result<bool>
Sourcepub fn supersede(&mut self, revision: u64) -> Result<()>
pub fn supersede(&mut self, revision: u64) -> Result<()>
Marks all earlier build/startup work stale without interrupting the running application.
Sourcepub fn build(&mut self, revision: u64, command: &mut Command) -> Result<()>
pub fn build(&mut self, revision: u64, command: &mut Command) -> Result<()>
Command must build into an isolated output path; never overwrite the running executable. Configure stdout/stderr as files or inherited streams, not unconsumed pipes.
Sourcepub fn poll_build(&mut self) -> Result<Option<BuiltRevision>>
pub fn poll_build(&mut self) -> Result<Option<BuiltRevision>>
None means the build is still running. Failure and supersession never retire the old process.
Sourcepub fn launch(
&mut self,
ticket: BuiltRevision,
command: &mut Command,
state: &RestartState,
timeout: Duration,
) -> Result<()>
pub fn launch( &mut self, ticket: BuiltRevision, command: &mut Command, state: &RestartState, timeout: Duration, ) -> Result<()>
The supplied command must run the artifact produced by the ticket’s build. State is captured after building, so edits made while the compiler runs are retained.
pub fn poll_replacement(&mut self) -> Result<ReplacementStatus>
Trait Implementations§
Source§impl Drop for RestartSupervisor
impl Drop for RestartSupervisor
Auto Trait Implementations§
impl Freeze for RestartSupervisor
impl RefUnwindSafe for RestartSupervisor
impl Send for RestartSupervisor
impl Sync for RestartSupervisor
impl Unpin for RestartSupervisor
impl UnsafeUnpin for RestartSupervisor
impl UnwindSafe for RestartSupervisor
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