[−][src]Struct zerogc_simple::Gc
A garbage collected pointer
See docs for zerogc::GcRef
Trait Implementations
impl<'gc, T: GcSafe + 'gc> Clone for Gc<'gc, T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'gc, T: GcSafe + 'gc> Copy for Gc<'gc, T>
[src]
impl<'gc, T: GcSafe + Debug + 'gc> Debug for Gc<'gc, T>
[src]
impl<'gc, T: GcSafe + 'gc> Deref for Gc<'gc, T>
[src]
impl<'gc, T: GcSafe + Eq + 'gc> Eq for Gc<'gc, T>
[src]
impl<'gc, 'new_gc, T> GcBrand<'new_gc, SimpleCollector> for Gc<'gc, T> where
T: GcSafe + GcBrand<'new_gc, SimpleCollector>,
T::Branded: GcSafe,
[src]
T: GcSafe + GcBrand<'new_gc, SimpleCollector>,
T::Branded: GcSafe,
Rebrand
type Branded = Gc<'new_gc, <T as GcBrand<'new_gc, SimpleCollector>>::Branded>
This type with all garbage collected lifetimes changed to 'new_gc
Read more
impl<'gc, T> GcCreateHandle<'gc, T> for Gc<'gc, T> where
T: GcSafe,
T: GcBrand<'static, SimpleCollector>,
T::Branded: GcSafe,
[src]
T: GcSafe,
T: GcBrand<'static, SimpleCollector>,
T::Branded: GcSafe,
We support handles
type Handle = GcHandle<T::Branded>
The type of handles to this object.
fn create_handle(&self) -> Self::Handle
[src]
impl<'gc, T, V> GcDirectBarrier<'gc, Gc<'gc, T>> for Gc<'gc, V> where
T: GcSafe + 'gc,
V: GcSafe + 'gc,
[src]
T: GcSafe + 'gc,
V: GcSafe + 'gc,
Simple GC doesn't need write barriers :)
This implementation is just for writing Gc<T> -> Gc<T>
unsafe fn write_barrier(&self, _owner: &Gc<'gc, T>, _field_offset: usize)
[src]
impl<'gc, T: GcSafe + 'gc> GcRef<'gc, T> for Gc<'gc, T>
[src]
type System = SimpleCollector
The type of the garbage collection system that created this pointer Read more
fn value(&self) -> &'gc T
[src]
unsafe fn as_raw_ptr(&self) -> *mut T
[src]
impl<'gc, T: GcSafe + 'gc> GcSafe for Gc<'gc, T>
[src]
Double-indirection is completely safe
const NEEDS_DROP: bool
[src]
impl<'gc, T: GcSafe + Hash + 'gc> Hash for Gc<'gc, T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'gc, T: GcSafe + PartialEq + 'gc> PartialEq<Gc<'gc, T>> for Gc<'gc, T>
[src]
impl<'gc, T: GcSafe + PartialEq + 'gc> PartialEq<T> for Gc<'gc, T>
[src]
impl<'gc, T: GcSafe + Sync> Send for Gc<'gc, T>
[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
impl<'gc, T: GcSafe + Sync> Sync for Gc<'gc, T>
[src]
If the underlying type is Sync
, it's safe
to share garbage collected references between threads.
The collector itself is always safe :D
impl<'gc, T: GcSafe + 'gc> Trace for Gc<'gc, T>
[src]
Auto Trait Implementations
impl<'gc, T> !RefUnwindSafe for Gc<'gc, T>
impl<'gc, T> Unpin for Gc<'gc, T>
impl<'gc, T> !UnwindSafe for Gc<'gc, T>
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,