[][src]Struct all_is_cubes::universe::URef

pub struct URef<T> { /* fields omitted */ }

A reference from an object in a Universe to another.

If they are held by objects outside of the Universe, it is not guaranteed that they will remain valid (in which case using the URef will panic). To ensure an object does not vanish while operating on it, .borrow() it. (TODO: Should there be an operation in the style of Weak::upgrade?)

Implementations

impl<T: 'static> URef<T>[src]

pub fn borrow(&self) -> UBorrow<T>[src]

Borrow the value, in the sense of std::RefCell::borrow.

pub fn borrow_mut(&self) -> UBorrowMut<T>[src]

Borrow the value mutably, in the sense of std::RefCell::borrow_mut.

Trait Implementations

impl<T: Clone> Clone for URef<T>[src]

impl<T: Debug> Debug for URef<T>[src]

impl<T> Eq for URef<T>[src]

URefs are compared by pointer equality.

impl<T> Hash for URef<T>[src]

impl<T> PartialEq<URef<T>> for URef<T>[src]

URefs are compared by pointer equality: they are equal only if they refer to the same mutable cell.

Auto Trait Implementations

impl<T> !RefUnwindSafe for URef<T>

impl<T> !Send for URef<T>

impl<T> !Sync for URef<T>

impl<T> Unpin for URef<T>

impl<T> !UnwindSafe for URef<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,