Struct thex::Thex [] [src]

pub struct Thex<T> { /* fields omitted */ }

A wrapper type providing run-time shared ord thread-local exclusive access to an inner value of type T, where T implements StableDeref

Methods

impl<T: StableDeref> Thex<T>
[src]

[src]

Construct a new wrapped value

[src]

Aquire a read-only shared reference to the contained T

[src]

Returns a thread-exclusive lock to the wrapped value

Unsafety

It is unsafe to use this function, since you could easily alias the same value multiple times from the same thread.

If you want a safe alternative, you can use shared and wrap the value in a RefCell

Trait Implementations

impl<T: StableDeref + Debug> Debug for Thex<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Clone + Debug + StableDeref> Clone for Thex<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Sync for Thex<T>
[src]

impl<T> Send for Thex<T>
[src]