[−][src]Struct moving_gc_arena::Weak
A weak index into a region.
This index will never prevent an object from being collected, but can be used to test if an object has been collected, or access it as normal.
Implementations
impl<T> Weak<T>
[src]
pub fn get<'a>(&self, r: &'a Region<T>) -> &'a T
[src]
Gets the value at this location, when passed the correct region. As with Ix, the behavior when the region or location is unspecified (but is still safe).
pub fn get_mut<'a>(&self, r: &'a mut Region<T>) -> &'a mut T
[src]
pub fn try_get<'a>(&self, r: &'a Region<T>) -> Result<&'a T, Error>
[src]
Try to get a reference to this data, possibly returning an error.
If the region is correct, then an error always indicates that the pointed-to entry is no longer valid
pub fn try_get_mut<'a>(&self, r: &'a mut Region<T>) -> Result<&'a mut T, Error>
[src]
pub fn ix(&self) -> Ix<T>
[src]
Get the raw index pointed to this by weak. This method will panic if ix is expired. Use try_ix to handle failure
pub fn try_ix(&self) -> Result<Ix<T>, Error>
[src]
pub fn root(&self, region: &Region<T>) -> Root<T>
[src]
pub fn try_root(&self, region: &Region<T>) -> Result<Root<T>, Error>
[src]
Trait Implementations
impl<T> Clone for Weak<T>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Weak<T>
[src]
impl<T> Eq for Weak<T>
[src]
impl<T> PartialEq<Weak<T>> for Weak<T>
[src]
Auto Trait Implementations
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
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>,