Struct wasmtime_runtime::TlsRestore[][src]

pub struct TlsRestore(_);

Opaque state used to help control TLS state across stack switches for async support.

Implementations

impl TlsRestore[src]

pub unsafe fn take() -> TlsRestore[src]

Takes the TLS state that is currently configured and returns a token that is used to replace it later.

This is not a safe operation since it’s intended to only be used with stack switching found with fibers and async wasmtime.

pub unsafe fn replace(self) -> Result<(), Trap>[src]

Restores a previous tls state back into this thread’s TLS.

This is unsafe because it’s intended to only be used within the context of stack switching within wasmtime.

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,