pub struct Worker<T: Vhost> {
name: &'static str,
interrupt: Interrupt,
pub queues: BTreeMap<usize, Queue>,
pub vhost_handle: T,
vhost_interrupts: BTreeMap<usize, Event>,
vhost_error_events: BTreeMap<usize, Event>,
acked_features: u64,
pub server_tube: Tube,
}Expand description
Worker that takes care of running the vhost device.
Fields§
§name: &'static str§interrupt: Interrupt§queues: BTreeMap<usize, Queue>§vhost_handle: T§vhost_interrupts: BTreeMap<usize, Event>§vhost_error_events: BTreeMap<usize, Event>§acked_features: u64§server_tube: TubeImplementations§
Source§impl<T: Vhost> Worker<T>
impl<T: Vhost> Worker<T>
pub fn new( name: &'static str, queues: BTreeMap<usize, Queue>, vhost_handle: T, interrupt: Interrupt, acked_features: u64, server_tube: Tube, mem: GuestMemory, queue_vrings_base: Option<Vec<VringBase>>, ) -> Result<Worker<T>>
pub fn run(&mut self, kill_evt: Event) -> Result<()>
fn set_vring_call_for_entry( &self, queue_index: usize, vector: usize, ) -> Result<()>
fn set_vring_calls(&self) -> Result<()>
Auto Trait Implementations§
impl<T> Freeze for Worker<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Worker<T>
impl<T> Send for Worker<T>where
T: Send,
impl<T> Sync for Worker<T>where
T: Sync,
impl<T> Unpin for Worker<T>where
T: Unpin,
impl<T> !UnwindSafe for Worker<T>
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