pub struct IdCell<V: ?Sized, T> {
pub token: T,
/* private fields */
}Expand description
A thread-safe shared mutable type that can be
allows references into it’s interior (unlike Cell)
without returning guards (unlike RefCell, Mutex,
or RwLock).
Fields§
§token: TThe token that identifies this IdCell
Implementations§
Source§impl<V, T> IdCell<V, T>
impl<V, T> IdCell<V, T>
Sourcepub const fn with_token(value: V, token: T) -> Self
pub const fn with_token(value: V, token: T) -> Self
Create a new IdCell with the given token
Sourcepub fn into_raw_parts(self) -> (V, T)
pub fn into_raw_parts(self) -> (V, T)
Decompose the given IdCell into a value-token pair
Auto Trait Implementations§
impl<V, T> !Freeze for IdCell<V, T>
impl<V, T> !RefUnwindSafe for IdCell<V, T>
impl<V, T> Send for IdCell<V, T>
impl<V, T> Sync for IdCell<V, T>
impl<V, T> Unpin for IdCell<V, T>
impl<V, T> UnwindSafe for IdCell<V, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more