Struct zerogc_context::handle::GcHandle [−][src]
pub struct GcHandle<T: GcSafe, C: RawHandleImpl> { /* fields omitted */ }
Trait Implementations
impl<T: GcSafe, C: RawHandleImpl> Clone for GcHandle<T, C>
[src]
impl<T: GcSafe, C: RawHandleImpl> Clone for GcHandle<T, C>
[src]impl<T: GcSafe, C: RawHandleImpl> Drop for GcHandle<T, C>
[src]
impl<T: GcSafe, C: RawHandleImpl> Drop for GcHandle<T, C>
[src]impl<'new_gc, T, C> GcBindHandle<'new_gc, T> for GcHandle<T, C> where
T: GcSafe,
T: GcRebrand<'new_gc, CollectorId<C>>,
T::Branded: GcSafe,
C: RawHandleImplHack<'new_gc, T::Branded>,
[src]
impl<'new_gc, T, C> GcBindHandle<'new_gc, T> for GcHandle<T, C> where
T: GcSafe,
T: GcRebrand<'new_gc, CollectorId<C>>,
T::Branded: GcSafe,
C: RawHandleImplHack<'new_gc, T::Branded>,
[src]impl<T: GcSafe, C: RawHandleImpl> GcHandle<T> for GcHandle<T, C>
[src]
impl<T: GcSafe, C: RawHandleImpl> GcHandle<T> for GcHandle<T, C>
[src]type System = CollectorRef<C>
type System = CollectorRef<C>
The type of the system used with this handle
type Id = CollectorId<C>
type Id = CollectorId<C>
The type of CollectorId used with this sytem
fn use_critical<R>(&self, func: impl FnOnce(&T) -> R) -> R
[src]
fn use_critical<R>(&self, func: impl FnOnce(&T) -> R) -> R
[src]Access this handle inside the closure, possibly associating it with the specified Read more
impl<T: GcSafe, C: RawHandleImpl> Trace for GcHandle<T, C>
[src]
impl<T: GcSafe, C: RawHandleImpl> Trace for GcHandle<T, C>
[src]impl<T: GcSafe, C: RawHandleImpl> TraceImmutable for GcHandle<T, C>
[src]
impl<T: GcSafe, C: RawHandleImpl> TraceImmutable for GcHandle<T, C>
[src]impl<T: GcSafe, C: RawHandleImpl> NullTrace for GcHandle<T, C>
[src]
impl<T: GcSafe + Sync, C: RawHandleImpl + Sync> Send for GcHandle<T, C>
[src]
In order to send references between threads, the underlying type must be sync.
This is the same reason that Arc<T>: Send
requires T: Sync
Requires that the collector is thread-safe.
impl<T: GcSafe + Sync, C: RawHandleImpl + Sync> Sync for GcHandle<T, C>
[src]
If the underlying type is Sync, it’s safe to share garbage collected references between threads.
Requires that the collector is thread-safe.
Auto Trait Implementations
impl<T, C> RefUnwindSafe for GcHandle<T, C> where
T: RefUnwindSafe,
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: RefUnwindSafe,
T: RefUnwindSafe,
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: RefUnwindSafe,
impl<T, C> Unpin for GcHandle<T, C> where
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: Unpin,
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: Unpin,
impl<T, C> UnwindSafe for GcHandle<T, C> where
T: RefUnwindSafe,
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: UnwindSafe,
T: RefUnwindSafe,
<<C as RawCollectorImpl>::Ptr as CollectorPtr<C>>::Weak: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,