struct WlVfd {
socket: Option<ScmSocket<UnixStream>>,
guest_shared_memory: Option<SharedMemory>,
remote_pipe: Option<File>,
local_pipe: Option<(u32, File)>,
slot: Option<(u64, VmRequester)>,
is_dmabuf: bool,
map_info: u32,
fence: Option<File>,
is_fence: bool,
}
Fields§
§socket: Option<ScmSocket<UnixStream>>
§remote_pipe: Option<File>
§local_pipe: Option<(u32, File)>
§slot: Option<(u64, VmRequester)>
§is_dmabuf: bool
§map_info: u32
§fence: Option<File>
§is_fence: bool
Implementations§
source§impl WlVfd
impl WlVfd
fn connect<P: AsRef<Path>>(path: P) -> Result<WlVfd, WlError>
fn allocate(vm: VmRequester, size: u64) -> Result<WlVfd, WlError>
fn dmabuf( vm: VmRequester, width: u32, height: u32, format: u32 ) -> Result<(WlVfd, GpuMemoryDesc), WlError>
fn dmabuf_sync(&self, flags: u32) -> Result<(), WlError>
fn pipe_remote_read_local_write() -> Result<WlVfd, WlError>
fn pipe_remote_write_local_read() -> Result<WlVfd, WlError>
fn from_file(vm: VmRequester, descriptor: File) -> Result<WlVfd, WlError>
fn flags(&self, use_transition_flags: bool) -> u32
fn offset(&self) -> Option<u64>
fn size(&self) -> Option<u64>
fn send_descriptor(&self) -> Option<RawDescriptor>
fn wait_descriptor(&self) -> Option<&dyn AsRawDescriptor>
fn send( &mut self, rds: &[RawDescriptor], data: &mut Reader ) -> Result<WlResp<'_>, WlError>
fn recv(&mut self, in_file_queue: &mut Vec<File>) -> Result<Vec<u8>, WlError>
fn close_remote(&mut self)
fn close(&mut self) -> Result<(), WlError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WlVfd
impl !Send for WlVfd
impl !Sync for WlVfd
impl Unpin for WlVfd
impl !UnwindSafe for WlVfd
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.