pub struct ServerHandle { /* private fields */ }Expand description
A handle to a running MockServer process.
When dropped, the process is killed (SIGKILL on Unix, TerminateProcess on Windows).
Implementations§
Source§impl ServerHandle
impl ServerHandle
Sourcepub fn stop(&mut self) -> LauncherResult<()>
pub fn stop(&mut self) -> LauncherResult<()>
Stop the server by killing the process.
Sourcepub fn wait(&mut self) -> LauncherResult<ExitStatus>
pub fn wait(&mut self) -> LauncherResult<ExitStatus>
Wait for the child process to exit, returning its exit status.
Trait Implementations§
Source§impl Drop for ServerHandle
impl Drop for ServerHandle
Auto Trait Implementations§
impl Freeze for ServerHandle
impl RefUnwindSafe for ServerHandle
impl Send for ServerHandle
impl Sync for ServerHandle
impl Unpin for ServerHandle
impl UnsafeUnpin for ServerHandle
impl UnwindSafe for ServerHandle
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