Type Alias Ref

Source
pub type Ref<T, D> = OptionalRef<*const Block<T, D>>;
Expand description

A reference to an object allocated by a memory manager.

Aliased Type§

pub struct Ref<T, D> { /* private fields */ }

Implementations§

Source§

impl<T: Object, D: Dealloc> Ref<T, D>

Source

pub fn try_to_mut_ref(self) -> Result<MutRef<T, D>, Self>

Trait Implementations§

Source§

impl<D: Dealloc, T: RefCast<D>> AnyCast<D> for Ref<T, D>

Source§

unsafe fn has_same_type(any_internal: u64) -> bool

Source§

unsafe fn move_to_any_internal(self) -> u64

Source§

unsafe fn from_any_internal(any_internal: u64) -> Self

Source§

fn move_to_any(self) -> Any<D>

Source§

impl<T: Object, D: Dealloc> Deref for Ref<T, D>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.