Skip to main content

VmiHandlerExt

Trait VmiHandlerExt 

Source
pub trait VmiHandlerExt<Os>: VmiHandler<Os> + Sized
where Os: VmiOs,
{ // Provided methods fn with_deadline(self, deadline: Instant) -> VmiTerminationHandler<Self> { ... } fn with_termination_flag( self, termination_flag: Arc<AtomicBool>, ) -> VmiTerminationHandler<Self> { ... } fn with_termination_timeout( self, termination_timeout: Duration, ) -> VmiTerminationHandler<Self> { ... } }
Expand description

Extension methods on VmiHandler.

The blanket impl is the only impl of this trait, so implementors of VmiHandler cannot override the default bodies.

Provided Methods§

Source

fn with_deadline(self, deadline: Instant) -> VmiTerminationHandler<Self>

Wraps the handler in a VmiTerminationHandler that interrupts it at deadline.

Source

fn with_termination_flag( self, termination_flag: Arc<AtomicBool>, ) -> VmiTerminationHandler<Self>

Wraps the handler in a VmiTerminationHandler with a flag that interrupts it once the flag becomes true.

Source

fn with_termination_timeout( self, termination_timeout: Duration, ) -> VmiTerminationHandler<Self>

Wraps the handler in a VmiTerminationHandler that gives it termination_timeout to finish once interrupted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Os, Handler> VmiHandlerExt<Os> for Handler
where Os: VmiOs, Handler: VmiHandler<Os>,