#[repr(u32)]
pub enum BackendReq {
Show 13 variants IOTLB_MSG = 1, CONFIG_CHANGE_MSG = 2, VRING_HOST_NOTIFIER_MSG = 3, VRING_CALL = 4, VRING_ERR = 5, SHMEM_MAP = 1_000, SHMEM_UNMAP = 1_001, DEPRECATED__FS_MAP = 1_002, DEPRECATED__FS_UNMAP = 1_003, DEPRECATED__FS_SYNC = 1_004, DEPRECATED__FS_IO = 1_005, GPU_MAP = 1_006, EXTERNAL_MAP = 1_007,
}
Expand description

Type of requests sending from backends to frontends.

These are called “backend-end message types” in the spec, so we call them BackendReq here even though it is somewhat confusing that the FrontendClient sends BackendReqs to a FrontendServer.

Variants§

§

IOTLB_MSG = 1

Send IOTLB messages with struct vhost_iotlb_msg as payload.

§

CONFIG_CHANGE_MSG = 2

Notify that the virtio device’s configuration space has changed.

§

VRING_HOST_NOTIFIER_MSG = 3

Set host notifier for a specified queue.

§

VRING_CALL = 4

Indicate that a buffer was used from the vring.

§

VRING_ERR = 5

Indicate that an error occurred on the specific vring.

§

SHMEM_MAP = 1_000

Indicates a request to map a fd into a shared memory region.

§

SHMEM_UNMAP = 1_001

Indicates a request to unmap part of a shared memory region.

§

DEPRECATED__FS_MAP = 1_002

Virtio-fs draft: map file content into the window.

§

DEPRECATED__FS_UNMAP = 1_003

Virtio-fs draft: unmap file content from the window.

§

DEPRECATED__FS_SYNC = 1_004

Virtio-fs draft: sync file content.

§

DEPRECATED__FS_IO = 1_005

Virtio-fs draft: perform a read/write from an fd directly to GPA.

§

GPU_MAP = 1_006

Indicates a request to map GPU memory into a shared memory region.

§

EXTERNAL_MAP = 1_007

Indicates a request to map external memory into a shared memory region.

Implementations§

source§

impl BackendReq

source

pub fn n(value: u32) -> Option<Self>

Trait Implementations§

source§

impl Clone for BackendReq

source§

fn clone(&self) -> BackendReq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BackendReq

source§

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

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

impl From<BackendReq> for u32

source§

fn from(req: BackendReq) -> u32

Converts to this type from the input type.
source§

impl Ord for BackendReq

source§

fn cmp(&self, other: &BackendReq) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for BackendReq

source§

fn eq(&self, other: &BackendReq) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BackendReq

source§

fn partial_cmp(&self, other: &BackendReq) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TryFrom<u32> for BackendReq

§

type Error = ReqError

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

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for BackendReq

source§

impl Eq for BackendReq

source§

impl Req for BackendReq

source§

impl StructuralPartialEq for BackendReq

Auto Trait Implementations§

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
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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.