Struct zerogc_context::handle::GcHandleList[][src]

pub struct GcHandleList<C: RawHandleImpl> { /* fields omitted */ }
Expand description

Concurrent list of GcHandles

Each bucket in the linked list is twice the size of the previous one, ensuring amortized growth

The list can not be appended to while a collection is in progress.

TODO: This list only grows. It never shrinks!!

Implementations

impl<C: RawHandleImpl> GcHandleList<C>[src]

pub fn new() -> Self[src]

pub unsafe fn trace<F, E>(&mut self, visitor: F) -> Result<(), E> where
    F: FnMut(*mut (), &C::TypeInfo) -> Result<(), E>, 
[src]

Trace the GcHandle using the specified closure.

Safety

Assumes the visitor function is well behaved.

TODO: Can the ‘unsafe’ be removed? I think we were only using it for ‘trace_inner’ because it assumes the fences were already applied. Now that’s behind a layer of abstraction, the unsafety has technically been moved to the caller.

Trait Implementations

impl<C: RawHandleImpl> Drop for GcHandleList<C>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<C> RefUnwindSafe for GcHandleList<C>

impl<C> Send for GcHandleList<C>

impl<C> Sync for GcHandleList<C>

impl<C> Unpin for GcHandleList<C>

impl<C> UnwindSafe for GcHandleList<C>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

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

Immutably borrows from an owned value. Read more

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

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

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]