pub trait NetT<T: TapT>: Vhost + AsRawDescriptor + Send + Sized {
// Required methods
fn new(vhost_net_device_path: &Path) -> Result<Self>;
fn set_backend(
&self,
queue_index: usize,
descriptor: Option<&T>
) -> Result<()>;
}
Required Methods§
sourcefn set_backend(&self, queue_index: usize, descriptor: Option<&T>) -> Result<()>
fn set_backend(&self, queue_index: usize, descriptor: Option<&T>) -> Result<()>
Set the tap file descriptor that will serve as the VHOST_NET backend. This will start the vhost worker for the given queue.
§Arguments
queue_index
- Index of the queue to modify.descriptor
- Tap interface that will be used as the backend.
Object Safety§
This trait is not object safe.