[][src]Struct plugin_tls::Context

#[repr(transparent)]pub struct Context(_);

The context to be installed in plugins.

Implementations

impl Context[src]

pub unsafe fn initialize_tls(self)[src]

Initialize the thread local storage.

Safety

This must be called only once in each binary, and prior to any thread-local values managed by this library being accessed within the binary. Otherwise UB may occur.

impl Context[src]

pub fn get() -> Self[src]

Get the context.

Separate instances of Context will always be identical.

pub fn reset()[src]

Reset the thread-local storage for the current thread.

This destructs all values and returns the state to a point as if no values have yet been accessed on the current thread.

Auto Trait Implementations

impl RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

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> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

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

impl<T> SelfOps for T where
    T: ?Sized

impl<This> TransmuteElement for This where
    This: ?Sized
[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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The error type returned when the conversion fails.

impl<T> TypeIdentity for T where
    T: ?Sized

type Type = T

The same type as Self. Read more