Trait video_core::FramebufferControl
source · pub trait FramebufferControl: Send {
// Required methods
fn map<'life0, 'async_trait>(
&'life0 mut self,
gpa: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unmap<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_format<'life0, 'async_trait>(
&'life0 mut self,
format: FramebufferFormat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Functions necessary to control the framebuffer from a video device.
This trait needs to be async so that an implementation of these functions can be async.
For example, the GET request needed to map the framebuffer from Underhill is async since the video device needs to wait for a response from the host to send an ack to the guest.
Required Methods§
sourcefn map<'life0, 'async_trait>(
&'life0 mut self,
gpa: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn map<'life0, 'async_trait>(
&'life0 mut self,
gpa: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Maps the framebuffer to the guest at the specified GPA.
sourcefn unmap<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unmap<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unmaps the framebuffer from the guest.
sourcefn set_format<'life0, 'async_trait>(
&'life0 mut self,
format: FramebufferFormat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_format<'life0, 'async_trait>(
&'life0 mut self,
format: FramebufferFormat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the framebuffer format.