pub struct BalloonControllerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl BalloonControllerSynchronousProxy
impl BalloonControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<BalloonControllerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<BalloonControllerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_balloon_size(
&self,
___deadline: MonotonicInstant,
) -> Result<(u32, u32), Error>
pub fn get_balloon_size( &self, ___deadline: MonotonicInstant, ) -> Result<(u32, u32), Error>
Get the current and requested number of pages in the memory balloon.
current_num_pages is the number of pages balloon has right now. requested_num_pages is the desired number of pages in the balloon.
‘current_num_pages’ corresponds to the ‘actual’ virtio-balloon config field ‘requested_num_pages’ corresponds to the ‘num_pages’ virtio-balloon config field.
Sourcepub fn request_num_pages(&self, requested_num_pages: u32) -> Result<(), Error>
pub fn request_num_pages(&self, requested_num_pages: u32) -> Result<(), Error>
Request a number of pages to be supplied to the memory balloon.
If requested_num_pages
is greater than the current_num_pages
config
value, the guest driver SHOULD provide additional pages to the memory balloon.
If requested_num_pages
is less than the ‘current_num_pages’ config value,
the guest driver MAY reclaim pages from the memory balloon.
Trait Implementations§
Source§impl SynchronousProxy for BalloonControllerSynchronousProxy
impl SynchronousProxy for BalloonControllerSynchronousProxy
Source§type Proxy = BalloonControllerProxy
type Proxy = BalloonControllerProxy
Source§type Protocol = BalloonControllerMarker
type Protocol = BalloonControllerMarker
Proxy
controls.