[−][src]Struct all_is_cubes::universe::URef
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]
URef
s are compared by pointer equality.
impl<T> Hash for URef<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> PartialEq<URef<T>> for URef<T>
[src]
URef
s 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]
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,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,