pub struct DevServerHandle { /* private fields */ }Expand description
A handle to a running Vite dev server child process.
Dropping this handle kills the child process, preventing orphaned Node
processes when the Rust dev server restarts (e.g. with cargo watch).
Keep it alive for the full lifetime of your server:
let config = ViteConfig::from_env(None);
// Bind to a variable so it lives until the end of main.
let _dev_server = spawn_dev_server(&config);Trait Implementations§
Source§impl Debug for DevServerHandle
impl Debug for DevServerHandle
Source§impl Drop for DevServerHandle
impl Drop for DevServerHandle
Auto Trait Implementations§
impl Freeze for DevServerHandle
impl RefUnwindSafe for DevServerHandle
impl Send for DevServerHandle
impl Sync for DevServerHandle
impl Unpin for DevServerHandle
impl UnsafeUnpin for DevServerHandle
impl UnwindSafe for DevServerHandle
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