Struct safe_cell::SafeCell [−][src]
pub struct SafeCell<T> { /* fields omitted */ }
Expand description
The SafeCell
type.
See the module-level documentation for more information.
Implementations
Returns a mutable reference to the wrapped value.
Using this reference, the value can be safely mutated. Using the
type-level mechanism provided by exterior mutability, SafeCell
guarantees that no unsound concurrent access can occur.
Extracts and returns the wrapped value.
Note that this method must not be called concurrently, and once
into_inner
is called, references obtained by get
and get_mut
must no longer be used. This is statically ensured.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for SafeCell<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for SafeCell<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more