Struct kodept_ast::graph::GhostToken
source · pub struct GhostToken(/* private fields */);Implementations§
source§impl GhostToken
impl GhostToken
Methods from Deref<Target = TLCellOwner<Ghost>>§
sourcepub fn cell<T>(&self, value: T) -> TLCell<Q, T>
pub fn cell<T>(&self, value: T) -> TLCell<Q, T>
Create a new cell owned by this owner instance. See also
TLCell::new.
sourcepub fn ro<T, 'a>(&'a self, tc: &'a TLCell<Q, T>) -> &'a Twhere
T: ?Sized,
pub fn ro<T, 'a>(&'a self, tc: &'a TLCell<Q, T>) -> &'a Twhere
T: ?Sized,
Borrow contents of a TLCell immutably (read-only). Many
TLCell instances can be borrowed immutably at the same time
from the same owner.
sourcepub fn rw<T, 'a>(&'a mut self, tc: &'a TLCell<Q, T>) -> &'a mut Twhere
T: ?Sized,
pub fn rw<T, 'a>(&'a mut self, tc: &'a TLCell<Q, T>) -> &'a mut Twhere
T: ?Sized,
Borrow contents of a TLCell mutably (read-write). Only one
TLCell at a time can be borrowed from the owner using this
call. The returned reference must go out of scope before
another can be borrowed.
sourcepub fn rw2<T, U, 'a>(
&'a mut self,
tc1: &'a TLCell<Q, T>,
tc2: &'a TLCell<Q, U>
) -> (&'a mut T, &'a mut U)
pub fn rw2<T, U, 'a>( &'a mut self, tc1: &'a TLCell<Q, T>, tc2: &'a TLCell<Q, U> ) -> (&'a mut T, &'a mut U)
Borrow contents of two TLCell instances mutably. Panics if
the two TLCell instances point to the same memory.
Trait Implementations§
source§impl Debug for GhostToken
impl Debug for GhostToken
source§impl Deref for GhostToken
impl Deref for GhostToken
source§impl DerefMut for GhostToken
impl DerefMut for GhostToken
source§impl<'token> From<&'token GhostToken> for RefAccess<'token>
impl<'token> From<&'token GhostToken> for RefAccess<'token>
source§fn from(original: &'token GhostToken) -> RefAccess<'token>
fn from(original: &'token GhostToken) -> RefAccess<'token>
Converts to this type from the input type.
source§impl<'token> From<&'token mut GhostToken> for MutAccess<'token>
impl<'token> From<&'token mut GhostToken> for MutAccess<'token>
source§fn from(original: &'token mut GhostToken) -> MutAccess<'token>
fn from(original: &'token mut GhostToken) -> MutAccess<'token>
Converts to this type from the input type.
source§impl From<TLCellOwner<Ghost>> for GhostToken
impl From<TLCellOwner<Ghost>> for GhostToken
source§fn from(original: TLCellOwner<Ghost>) -> GhostToken
fn from(original: TLCellOwner<Ghost>) -> GhostToken
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for GhostToken
impl !Send for GhostToken
impl !Sync for GhostToken
impl Unpin for GhostToken
impl UnwindSafe for GhostToken
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