pub struct BalloonControllerProxy { /* private fields */ }
Implementations§
Source§impl BalloonControllerProxy
impl BalloonControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.virtualization/BalloonController.
Sourcepub fn take_event_stream(&self) -> BalloonControllerEventStream
pub fn take_event_stream(&self) -> BalloonControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_balloon_size(
&self,
) -> QueryResponseFut<(u32, u32), DefaultFuchsiaResourceDialect>
pub fn get_balloon_size( &self, ) -> QueryResponseFut<(u32, u32), DefaultFuchsiaResourceDialect>
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 BalloonControllerProxyInterface for BalloonControllerProxy
impl BalloonControllerProxyInterface for BalloonControllerProxy
type GetBalloonSizeResponseFut = QueryResponseFut<(u32, u32)>
type GetMemStatsResponseFut = QueryResponseFut<(i32, Option<Vec<MemStat>>)>
fn get_balloon_size(&self) -> Self::GetBalloonSizeResponseFut
fn request_num_pages(&self, requested_num_pages: u32) -> Result<(), Error>
fn get_mem_stats(&self) -> Self::GetMemStatsResponseFut
Source§impl Clone for BalloonControllerProxy
impl Clone for BalloonControllerProxy
Source§fn clone(&self) -> BalloonControllerProxy
fn clone(&self) -> BalloonControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BalloonControllerProxy
impl Debug for BalloonControllerProxy
Source§impl Proxy for BalloonControllerProxy
impl Proxy for BalloonControllerProxy
Source§type Protocol = BalloonControllerMarker
type Protocol = BalloonControllerMarker
Proxy
controls.