Struct zerogc::epsilon::EpsilonContext
source · [−]pub struct EpsilonContext { /* private fields */ }
Expand description
A never-collecting garbage collector context.
WARNING: This never actually collects any garbage.
Trait Implementations
sourceimpl Drop for EpsilonContext
impl Drop for EpsilonContext
sourceimpl GcContext for EpsilonContext
impl GcContext for EpsilonContext
type System = EpsilonSystem
type System = EpsilonSystem
The system used with this context
type Id = EpsilonCollectorId
type Id = EpsilonCollectorId
The type of ids used in the system
sourceunsafe fn unchecked_safepoint<T: Trace>(&self, _value: &mut &mut T)
unsafe fn unchecked_safepoint<T: Trace>(&self, _value: &mut &mut T)
Potentially perform a garbage collection, freeing all objects that aren’t reachable from the specified root. Read more
sourceunsafe fn freeze(&mut self)
unsafe fn freeze(&mut self)
Inform the garbage collection system we are at a safepoint and are ready for a potential garbage collection. Read more
sourceunsafe fn recurse_context<T, F, R>(&self, value: &mut &mut T, func: F) -> R where
T: Trace,
F: for<'gc> FnOnce(&'gc mut Self, &'gc mut T) -> R,
unsafe fn recurse_context<T, F, R>(&self, value: &mut &mut T, func: F) -> R where
T: Trace,
F: for<'gc> FnOnce(&'gc mut Self, &'gc mut T) -> R,
sourceunsafe fn basic_safepoint<T: Trace>(&mut self, root: &mut &mut T)
unsafe fn basic_safepoint<T: Trace>(&mut self, root: &mut &mut T)
Potentially perform a garbage collection, freeing all objects that aren’t reachable from the specified root. Read more
sourceimpl GcSimpleAlloc for EpsilonContext
impl GcSimpleAlloc for EpsilonContext
sourceunsafe fn alloc_uninit<'gc, T>(&'gc self) -> *mut T where
T: GcSafe<'gc, EpsilonCollectorId>,
unsafe fn alloc_uninit<'gc, T>(&'gc self) -> *mut T where
T: GcSafe<'gc, EpsilonCollectorId>,
Allocate room for a object in, but don’t finish initializing it. Read more
sourcefn alloc<'gc, T>(&'gc self, value: T) -> Gc<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
fn alloc<'gc, T>(&'gc self, value: T) -> Gc<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
Allocate the specified object in this garbage collector, binding it to the lifetime of this collector. Read more
sourceunsafe fn alloc_uninit_slice<'gc, T>(&'gc self, len: usize) -> *mut T where
T: GcSafe<'gc, Self::Id>,
unsafe fn alloc_uninit_slice<'gc, T>(&'gc self, len: usize) -> *mut T where
T: GcSafe<'gc, Self::Id>,
Allocate a slice with the specified length, whose memory is uninitialized Read more
sourcefn alloc_raw_vec_with_capacity<'gc, T>(
&'gc self,
capacity: usize
) -> EpsilonRawVec<'gc, T> where
T: GcSafe<'gc, Self::Id>,
fn alloc_raw_vec_with_capacity<'gc, T>(
&'gc self,
capacity: usize
) -> EpsilonRawVec<'gc, T> where
T: GcSafe<'gc, Self::Id>,
sourcefn alloc_str<'gc>(&'gc self, src: &str) -> GcString<'gc, Self::Id>
fn alloc_str<'gc>(&'gc self, src: &str) -> GcString<'gc, Self::Id>
Allocate a GcString, copied from the specified source
sourcefn alloc_slice_copy<'gc, T>(&'gc self, src: &[T]) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id> + Copy,
fn alloc_slice_copy<'gc, T>(&'gc self, src: &[T]) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id> + Copy,
Allocate a slice, copied from the specified input
sourcefn alloc_array_from_vec<'gc, T>(
&'gc self,
src: Vec<T>
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
fn alloc_array_from_vec<'gc, T>(
&'gc self,
src: Vec<T>
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
Allocate an array, taking ownership of the values in the specified vec. Read more
sourceunsafe fn alloc_slice_fill_with<'gc, T, F>(
&'gc self,
len: usize,
func: F
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
F: FnMut(usize) -> T,
unsafe fn alloc_slice_fill_with<'gc, T, F>(
&'gc self,
len: usize,
func: F
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id>,
F: FnMut(usize) -> T,
Allocate a slice by filling it with results from the specified closure. Read more
sourcefn alloc_slice_none<'gc, T>(
&'gc self,
len: usize
) -> GcArray<'gc, Option<T>, Self::Id> where
T: GcSafe<'gc, Self::Id>,
fn alloc_slice_none<'gc, T>(
&'gc self,
len: usize
) -> GcArray<'gc, Option<T>, Self::Id> where
T: GcSafe<'gc, Self::Id>,
Allocate a slice of the specified length,
initializing everything to None
Read more
sourcefn alloc_slice_fill_copy<'gc, T>(
&'gc self,
len: usize,
val: T
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id> + Copy,
fn alloc_slice_fill_copy<'gc, T>(
&'gc self,
len: usize,
val: T
) -> GcArray<'gc, T, Self::Id> where
T: GcSafe<'gc, Self::Id> + Copy,
Allocate a slice by repeatedly copying a single value.
Auto Trait Implementations
impl !RefUnwindSafe for EpsilonContext
impl !Send for EpsilonContext
impl !Sync for EpsilonContext
impl Unpin for EpsilonContext
impl !UnwindSafe for EpsilonContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more