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 !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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.