pub struct GhostToken(/* private fields */);

Implementations§

source§

impl GhostToken

source

pub fn new() -> Self

Methods from Deref<Target = TLCellOwner<Ghost>>§

source

pub fn cell<T>(&self, value: T) -> TLCell<Q, T>

Create a new cell owned by this owner instance. See also TLCell::new.

source

pub fn ro<T, 'a>(&'a self, tc: &'a TLCell<Q, T>) -> &'a T
where 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.

source

pub fn rw<T, 'a>(&'a mut self, tc: &'a TLCell<Q, T>) -> &'a mut T
where 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.

source

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)
where T: ?Sized, U: ?Sized,

Borrow contents of two TLCell instances mutably. Panics if the two TLCell instances point to the same memory.

source

pub fn rw3<T, U, V, 'a>( &'a mut self, tc1: &'a TLCell<Q, T>, tc2: &'a TLCell<Q, U>, tc3: &'a TLCell<Q, V> ) -> (&'a mut T, &'a mut U, &'a mut V)
where T: ?Sized, U: ?Sized, V: ?Sized,

Borrow contents of three TLCell instances mutably. Panics if any pair of TLCell instances point to the same memory.

Trait Implementations§

source§

impl Debug for GhostToken

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for GhostToken

§

type Target = TLCellOwner<Ghost>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for GhostToken

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'token> From<&'token GhostToken> for RefAccess<'token>

source§

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>

source§

fn from(original: &'token mut GhostToken) -> MutAccess<'token>

Converts to this type from the input type.
source§

impl From<TLCellOwner<Ghost>> for GhostToken

source§

fn from(original: TLCellOwner<Ghost>) -> GhostToken

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more