pub struct WlState {Show 14 fields
wayland_paths: BTreeMap<String, PathBuf>,
vm: VmRequester,
resource_bridge: Option<Tube>,
use_transition_flags: bool,
wait_ctx: WaitContext<u32>,
vfds: BTreeMap<u32, WlVfd>,
next_vfd_id: u32,
in_file_queue: Vec<File>,
in_queue: VecDeque<(u32, WlRecv)>,
current_recv_vfd: Option<u32>,
recv_vfds: Vec<u32>,
signaled_fence: Option<SafeDescriptor>,
use_send_vfd_v2: bool,
address_offset: Option<u64>,
}Fields§
§wayland_paths: BTreeMap<String, PathBuf>§vm: VmRequester§resource_bridge: Option<Tube>§use_transition_flags: bool§wait_ctx: WaitContext<u32>§vfds: BTreeMap<u32, WlVfd>§next_vfd_id: u32§in_file_queue: Vec<File>§in_queue: VecDeque<(u32, WlRecv)>§current_recv_vfd: Option<u32>§recv_vfds: Vec<u32>§signaled_fence: Option<SafeDescriptor>§use_send_vfd_v2: bool§address_offset: Option<u64>Implementations§
Source§impl WlState
impl WlState
Sourcepub fn new(
wayland_paths: BTreeMap<String, PathBuf>,
mapper: Box<dyn SharedMemoryMapper>,
use_transition_flags: bool,
use_send_vfd_v2: bool,
resource_bridge: Option<Tube>,
gralloc: RutabagaGralloc,
address_offset: Option<u64>,
) -> WlState
pub fn new( wayland_paths: BTreeMap<String, PathBuf>, mapper: Box<dyn SharedMemoryMapper>, use_transition_flags: bool, use_send_vfd_v2: bool, resource_bridge: Option<Tube>, gralloc: RutabagaGralloc, address_offset: Option<u64>, ) -> WlState
Create a new WlState instance for running a virtio-wl device.
Sourcepub fn wait_ctx(&self) -> &WaitContext<u32>
pub fn wait_ctx(&self) -> &WaitContext<u32>
This is a hack so that we can drive the inner WaitContext from an async fn. The proper long-term solution is to replace the WaitContext completely by spawning async workers instead.
fn new_pipe(&mut self, id: u32, flags: u32) -> Result<WlResp<'_>, WlError>
fn new_alloc( &mut self, id: u32, flags: u32, size: u32, ) -> Result<WlResp<'_>, WlError>
fn new_dmabuf( &mut self, id: u32, width: u32, height: u32, format: u32, ) -> Result<WlResp<'_>, WlError>
fn dmabuf_sync( &mut self, vfd_id: u32, flags: u32, ) -> Result<WlResp<'_>, WlError>
fn new_context(&mut self, id: u32, name: &str) -> Result<WlResp<'_>, WlError>
fn process_wait_context(&mut self)
fn close(&mut self, vfd_id: u32) -> Result<WlResp<'_>, WlError>
fn get_info(&mut self, request: ResourceRequest) -> Option<SafeDescriptor>
fn send( &mut self, vfd_id: u32, vfd_count: usize, foreign_id: bool, reader: &mut Reader, ) -> Result<WlResp<'_>, WlError>
fn recv(&mut self, vfd_id: u32) -> Result<(), WlError>
fn execute(&mut self, reader: &mut Reader) -> Result<WlResp<'_>, WlError>
fn next_recv(&self) -> Option<WlResp<'_>>
fn pop_recv(&mut self)
fn compute_pfn(&self, offset: &Option<u64>) -> u64
Auto Trait Implementations§
impl Freeze for WlState
impl !RefUnwindSafe for WlState
impl !Send for WlState
impl !Sync for WlState
impl Unpin for WlState
impl !UnwindSafe for WlState
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