pub trait Frontend {
    // Provided methods
    fn handle_config_change(&mut self) -> HandlerResult<u64> { ... }
    fn shmem_map(
        &mut self,
        _req: &VhostUserShmemMapMsg,
        _fd: &dyn AsRawDescriptor
    ) -> HandlerResult<u64> { ... }
    fn shmem_unmap(
        &mut self,
        _req: &VhostUserShmemUnmapMsg
    ) -> HandlerResult<u64> { ... }
    fn gpu_map(
        &mut self,
        _req: &VhostUserGpuMapMsg,
        _descriptor: &dyn AsRawDescriptor
    ) -> HandlerResult<u64> { ... }
    fn external_map(
        &mut self,
        _req: &VhostUserExternalMapMsg
    ) -> HandlerResult<u64> { ... }
}
Expand description

Trait for vhost-user frontends to respond to requests from the backend.

Each method corresponds to a vhost-user protocol method. See the specification for details.

Provided Methods§

source

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

Handle device configuration change notifications.

source

fn shmem_map( &mut self, _req: &VhostUserShmemMapMsg, _fd: &dyn AsRawDescriptor ) -> HandlerResult<u64>

Handle shared memory region mapping requests.

source

fn shmem_unmap(&mut self, _req: &VhostUserShmemUnmapMsg) -> HandlerResult<u64>

Handle shared memory region unmapping requests.

source

fn gpu_map( &mut self, _req: &VhostUserGpuMapMsg, _descriptor: &dyn AsRawDescriptor ) -> HandlerResult<u64>

Handle GPU shared memory region mapping requests.

source

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

Handle external memory region mapping requests.

Implementors§