Struct LocalHandle

pub struct LocalHandle { /* private fields */ }

A handle to a garbage collector.

Implementations

impl LocalHandle

fn pin(&self) -> Guard

Pins the handle.

fn is_pinned(&self) -> bool

Returns true if the handle is pinned.

fn collector(&self) -> &Collector

Returns the Collector associated with this handle.

Trait Implementations

impl Debug for LocalHandle

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

impl Drop for LocalHandle

fn drop(&mut self)

Auto Trait Implementations

impl !RefUnwindSafe for LocalHandle

impl !Send for LocalHandle

impl !Sync for LocalHandle

impl !UnwindSafe for LocalHandle

impl Freeze for LocalHandle

impl Unpin for LocalHandle

impl UnsafeUnpin for LocalHandle

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for LocalHandle

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for LocalHandle

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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