Struct current::Current [] [src]

pub struct Current<T>(_);

The current value of a type.

Methods

impl<T> Current<T> where
    T: Any
[src]

Creates a new current object

Gets mutable reference to current object. Requires mutable reference to prevent access to globals in safe code, and to prevent mutable borrows of same value in scope. Is unsafe because returned reference inherits lifetime from argument.

Unwraps mutable reference to current object, but with nicer error message.

Trait Implementations

impl<T> Deref for Current<T> where
    T: Any
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<T> DerefMut for Current<T> where
    T: Any
[src]

The method called to mutably dereference a value