Struct FrontendClient

Source
pub struct FrontendClient {
    sock: Connection,
    reply_ack_negotiated: bool,
}
Expand description

Client for a vhost-user frontend. Allows a backend to send requests to the frontend.

Fields§

§sock: Connection§reply_ack_negotiated: bool

Implementations§

Source§

impl FrontendClient

Source

pub fn new(ep: Connection, reply_ack_negotiated: bool) -> Self

Create a new instance from the given connection.

Source

fn send_message<T>( &mut self, request: BackendReq, msg: &T, fds: Option<&[RawDescriptor]>, want_reply: bool, ) -> HandlerResult<()>
where T: IntoBytes + Immutable,

Source

fn wait_for_reply(&mut self, hdr: &VhostUserMsgHeader) -> Result<()>

Trait Implementations§

Source§

impl Frontend for FrontendClient

Source§

fn shmem_map( &mut self, req: &VhostUserMMap, fd: &dyn AsRawDescriptor, ) -> HandlerResult<()>

Handle shared memory region mapping requests.

Source§

fn shmem_unmap(&mut self, req: &VhostUserMMap) -> HandlerResult<()>

Handle shared memory region unmapping requests.

Source§

fn handle_config_change(&mut self) -> HandlerResult<()>

Handle config change requests.

Source§

fn gpu_map( &mut self, req: &VhostUserGpuMapMsg, descriptor: &dyn AsRawDescriptor, ) -> HandlerResult<()>

Handle GPU shared memory region mapping requests.

Source§

fn external_map(&mut self, req: &VhostUserExternalMapMsg) -> HandlerResult<()>

Handle external memory region mapping requests.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.