pub struct GuestAgentClient { /* private fields */ }Expand description
A connection to the guest agent virtio-serial channel exposed by QEMU.
Implementations§
Source§impl GuestAgentClient
impl GuestAgentClient
Sourcepub fn connect(path: &Path) -> Result<Self>
pub fn connect(path: &Path) -> Result<Self>
Connect to QEMU’s private guest-agent proxy socket.
Sourcepub fn info(&mut self) -> Result<Value>
pub fn info(&mut self) -> Result<Value>
Return the guest agent’s supported-command and version descriptor.
Sourcepub fn shutdown(&mut self, mode: ShutdownMode) -> Result<()>
pub fn shutdown(&mut self, mode: ShutdownMode) -> Result<()>
Ask the guest operating system to shut down, halt, or reboot.
The guest-agent specification intentionally sends no response because shutdown may terminate the guest before one can be delivered.
Auto Trait Implementations§
impl Forget for GuestAgentClient
impl Freeze for GuestAgentClientwhere
*const [MaybeUninit<u8>] is !null: Freeze,
PhantomData<[MaybeUninit<u8>]>: Freeze,
I32NotAllOnes: Freeze,
impl Move for GuestAgentClient
impl RefUnwindSafe for GuestAgentClientwhere
I32NotAllOnes: RefUnwindSafe,
impl Send for GuestAgentClient
impl Sync for GuestAgentClient
impl Unpin for GuestAgentClient
impl UnsafeUnpin for GuestAgentClientwhere
*const [MaybeUninit<u8>] is !null: UnsafeUnpin,
PhantomData<[MaybeUninit<u8>]>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
impl UnwindSafe for GuestAgentClient
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