Struct glib::thread_guard::ThreadGuard
source · [−]pub struct ThreadGuard<T> { /* private fields */ }Expand description
Thread guard that only gives access to the contained value on the thread it was created on.
Implementations
Create a new thread guard around value.
The thread guard ensures that access to the value is only allowed from the thread it was created on, and otherwise panics.
The thread guard implements the Send trait even if the contained value does not.
Return a reference to the contained value from the thread guard.
Panics
This function panics if called from a different thread than where the thread guard was created.
Return a mutable reference to the contained value from the thread guard.
Panics
This function panics if called from a different thread than where the thread guard was created.
Return the contained value from the thread guard.
Panics
This function panics if called from a different thread than where the thread guard was created.