Struct devices::virtio::wl::WlVfd

source ·
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>>§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

Implementations§

source§

impl WlVfd

source

fn connect<P: AsRef<Path>>(path: P) -> Result<WlVfd, WlError>

source

fn allocate(vm: VmRequester, size: u64) -> Result<WlVfd, WlError>

source

fn dmabuf( vm: VmRequester, width: u32, height: u32, format: u32 ) -> Result<(WlVfd, GpuMemoryDesc), WlError>

source

fn dmabuf_sync(&self, flags: u32) -> Result<(), WlError>

source

fn pipe_remote_read_local_write() -> Result<WlVfd, WlError>

source

fn pipe_remote_write_local_read() -> Result<WlVfd, WlError>

source

fn from_file(vm: VmRequester, descriptor: File) -> Result<WlVfd, WlError>

source

fn flags(&self, use_transition_flags: bool) -> u32

source

fn offset(&self) -> Option<u64>

source

fn size(&self) -> Option<u64>

source

fn send_descriptor(&self) -> Option<RawDescriptor>

source

fn wait_descriptor(&self) -> Option<&dyn AsRawDescriptor>

source

fn send( &mut self, rds: &[RawDescriptor], data: &mut Reader ) -> Result<WlResp<'_>, WlError>

source

fn recv(&mut self, in_file_queue: &mut Vec<File>) -> Result<Vec<u8>, WlError>

source

fn close_remote(&mut self)

source

fn close(&mut self) -> Result<(), WlError>

Trait Implementations§

source§

impl Debug for WlVfd

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WlVfd

source§

fn default() -> WlVfd

Returns the “default value” for a type. Read more
source§

impl Drop for WlVfd

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V