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: boolImplementations§
Source§impl FrontendClient
impl FrontendClient
Sourcepub fn new(ep: Connection, reply_ack_negotiated: bool) -> Self
pub fn new(ep: Connection, reply_ack_negotiated: bool) -> Self
Create a new instance from the given connection.
fn send_message<T>(
&mut self,
request: BackendReq,
msg: &T,
fds: Option<&[RawDescriptor]>,
want_reply: bool,
) -> HandlerResult<()>where
T: IntoBytes + Immutable,
fn wait_for_reply(&mut self, hdr: &VhostUserMsgHeader) -> Result<()>
Trait Implementations§
Source§impl Frontend for FrontendClient
impl Frontend for FrontendClient
Source§fn shmem_map(
&mut self,
req: &VhostUserMMap,
fd: &dyn AsRawDescriptor,
) -> HandlerResult<()>
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<()>
fn shmem_unmap(&mut self, req: &VhostUserMMap) -> HandlerResult<()>
Handle shared memory region unmapping requests.
Source§fn handle_config_change(&mut self) -> HandlerResult<()>
fn handle_config_change(&mut self) -> HandlerResult<()>
Handle config change requests.
Source§fn gpu_map(
&mut self,
req: &VhostUserGpuMapMsg,
descriptor: &dyn AsRawDescriptor,
) -> HandlerResult<()>
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<()>
fn external_map(&mut self, req: &VhostUserExternalMapMsg) -> HandlerResult<()>
Handle external memory region mapping requests.
Auto Trait Implementations§
impl Freeze for FrontendClient
impl !RefUnwindSafe for FrontendClient
impl Send for FrontendClient
impl !Sync for FrontendClient
impl Unpin for FrontendClient
impl UnwindSafe for FrontendClient
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