Trait rustrt::local::Local[src]

pub trait Local<Borrowed> {
    fn put(value: Box<Self>);
    fn take() -> Box<Self>;
    fn try_take() -> Option<Box<Self>>;
    fn exists(unused_value: Option<Self>) -> bool;
    fn borrow(unused_value: Option<Self>) -> Borrowed;
    unsafe fn unsafe_take() -> Box<Self>;
    unsafe fn unsafe_borrow() -> *mut Self;
    unsafe fn try_unsafe_borrow() -> Option<*mut Self>;
}

Encapsulates some task-local data.

Required Methods

fn put(value: Box<Self>)

fn take() -> Box<Self>

fn try_take() -> Option<Box<Self>>

fn exists(unused_value: Option<Self>) -> bool

fn borrow(unused_value: Option<Self>) -> Borrowed

unsafe fn unsafe_take() -> Box<Self>

unsafe fn unsafe_borrow() -> *mut Self

unsafe fn try_unsafe_borrow() -> Option<*mut Self>

Implementors