Struct ghost_cell::GhostCell [−][src]
pub struct GhostCell<'brand, T: ?Sized> { /* fields omitted */ }
Branded wrapper for the data structure’s nodes, whose type is T.
Implementations
impl<'brand, T> GhostCell<'brand, T>[src]
pub fn new(value: T) -> Self[src]
Wraps some data T into a GhostCell with brand'brand.
pub fn into_inner(self) -> T[src]
Turns an owned GhostCell back into owned data.
pub fn get_mut(&mut self) -> &mut T[src]
Turns a mutably borrowed GhostCell to mutably borrowed data.
pub fn from_mut(t: &mut T) -> &mut Self[src]
Turns mutably borrowed data to a mutably borrowed GhostCell.
pub fn borrow<'a>(&'a self, _: &'a GhostToken<'brand>) -> &'a T[src]
Immutably borrows the GhostCell with the same-branded token.
pub fn borrow_mut<'a>(&'a self, _: &'a mut GhostToken<'brand>) -> &'a mut T[src]
Mutably borrows the GhostCell with the same-branded token.
Auto Trait Implementations
impl<'brand, T: ?Sized> Send for GhostCell<'brand, T> where
T: Send,
T: Send,
impl<'brand, T> !Sync for GhostCell<'brand, T>
impl<'brand, T: ?Sized> Unpin for GhostCell<'brand, T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,