Trait GcMoveable

Source
pub(in core) trait GcMoveable {
    type Value;

    // Provided method
    fn move_value(&self, _to_space: &Bump) -> Option<(Self::Value, bool)> { ... }
}
Expand description

This trait is defined for types that can be moved by the GC. For types that don’t have any other pointers in them, they can use the implementation of this trait on GcHeap, which will just copy the object.

Required Associated Types§

Provided Methods§

Source

fn move_value(&self, _to_space: &Bump) -> Option<(Self::Value, bool)>

Implementations on Foreign Types§

Source§

impl<'a, T: GcMoveable<Value = NonNull<T>>> GcMoveable for &'a T

Source§

type Value = &'a T

Source§

fn move_value(&self, to_space: &Bump) -> Option<(Self::Value, bool)>

Implementors§