Trait muse_reactor::WorkUnit
source · pub trait WorkUnit:
Sized
+ Send
+ 'static {
// Required method
fn initialize(
self,
vms: &dyn NewVm<Self>,
guard: &mut CollectionGuard<'_>,
reactor: &ReactorHandle<Self>,
) -> Result<Vm, PrepareError>;
}Expand description
A custom unit of work for a Reactor.
Required Methods§
sourcefn initialize(
self,
vms: &dyn NewVm<Self>,
guard: &mut CollectionGuard<'_>,
reactor: &ReactorHandle<Self>,
) -> Result<Vm, PrepareError>
fn initialize( self, vms: &dyn NewVm<Self>, guard: &mut CollectionGuard<'_>, reactor: &ReactorHandle<Self>, ) -> Result<Vm, PrepareError>
Initializes a new virtual machine for this unit of work.
Object Safety§
This trait is not object safe.