[][src]Struct lucet_runtime_internals::instance::execution::KillSwitch

pub struct KillSwitch { /* fields omitted */ }

An object that can be used to terminate an instance's execution from a separate thread.

Methods

impl KillSwitch[src]

pub fn terminate(&self) -> Result<KillSuccess, KillError>[src]

Signal the instance associated with this KillSwitch to stop, if possible.

The returned Result only describes the behavior taken by this function, not necessarily what caused the associated instance to stop.

As an example, if a KillSwitch fires, sending a SIGALRM to an instance at the same moment it begins handling a SIGSEGV which is determined to be fatal, the instance may stop with State::Faulted before actually handling the SIGALRM we'd send here. So the host code will see State::Faulted as an instance state, where KillSwitch::terminate would return Ok(KillSuccess::Signalled).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.