pub struct QmpClient { /* private fields */ }Expand description
A minimal QMP client connected via a Unix socket.
Implementations§
Source§impl QmpClient
impl QmpClient
Sourcepub fn connect(
socket_path: &Path,
timeout: Duration,
) -> Result<Self, LaunchError>
pub fn connect( socket_path: &Path, timeout: Duration, ) -> Result<Self, LaunchError>
Connect to the QMP Unix socket and perform the capability negotiation handshake.
Sourcepub fn system_powerdown(&mut self) -> Result<(), LaunchError>
pub fn system_powerdown(&mut self) -> Result<(), LaunchError>
Send system_powerdown for a graceful ACPI shutdown.
Sourcepub fn quit(&mut self) -> Result<(), LaunchError>
pub fn quit(&mut self) -> Result<(), LaunchError>
Send quit to force QEMU to exit immediately.
Sourcepub fn query_status(&mut self) -> Result<String, LaunchError>
pub fn query_status(&mut self) -> Result<String, LaunchError>
Send query-status to check the VM’s run state.
Auto Trait Implementations§
impl Freeze for QmpClient
impl RefUnwindSafe for QmpClient
impl Send for QmpClient
impl Sync for QmpClient
impl Unpin for QmpClient
impl UnwindSafe for QmpClient
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