Struct KillState

Source
pub struct KillState { /* private fields */ }
Expand description

All instance state a remote kill switch needs to determine if and how to signal that execution should stop.

Some definitions for reference in this struct’s documentation:

  • “stopped” means “stop executing at some point before reaching the end of the entrypoint wasm function”.
  • “critical section” means what it typically means - an uninterruptable region of code. The detail here is that currently “critical section” and “hostcall” are interchangeable, but in the future this may change. Hostcalls may one day be able to opt out of criticalness, or perhaps guest code may include critical sections.

“Stopped” is a particularly loose word here because it encompasses the worst case: trying to stop a guest that is currently in a critical section. Because the signal will only be checked when exiting the critical section, the latency is bounded by whatever embedder guarantees are made. In fact, it is possible for a kill signal to be successfully sent and still never impactful, if a hostcall itself invokes lucet_hostcall_terminate!. In this circumstance, the hostcall would terminate the instance if it returned, but lucet_hostcall_terminate! will terminate the guest before the termination request would even be checked.

Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.