pub struct VmTaskDriverSource { /* private fields */ }
Expand description
A source for VmTaskDriver
s.
This is used to create device-specific drivers that implement Driver
and
Spawn
. These drivers’ behavior can be customized based on the needs of
the device.
The backend for these drivers is customizable for different environments.
Implementations§
Source§impl VmTaskDriverSource
impl VmTaskDriverSource
Sourcepub fn new(backend: impl 'static + BuildVmTaskDriver) -> Self
pub fn new(backend: impl 'static + BuildVmTaskDriver) -> Self
Returns a new task driver source backed by backend
.
Sourcepub fn simple(&self) -> VmTaskDriver
pub fn simple(&self) -> VmTaskDriver
Returns a VM task driver with default parameters.
Use this when you don’t care where your task runs.
Sourcepub fn builder(&self) -> VmTaskDriverBuilder<'_>
pub fn builder(&self) -> VmTaskDriverBuilder<'_>
Returns a builder for a custom VM task driver.
Trait Implementations§
Source§impl Clone for VmTaskDriverSource
impl Clone for VmTaskDriverSource
Source§fn clone(&self) -> VmTaskDriverSource
fn clone(&self) -> VmTaskDriverSource
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for VmTaskDriverSource
impl !RefUnwindSafe for VmTaskDriverSource
impl Send for VmTaskDriverSource
impl Sync for VmTaskDriverSource
impl Unpin for VmTaskDriverSource
impl !UnwindSafe for VmTaskDriverSource
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