wasmtime

Trait RootedGcRef

Source
pub trait RootedGcRef<T>: RootedGcRefImpl<T> + Deref<Target = T>
where T: GcRef,
{ }
Available on crate feature runtime only.
Expand description

A trait implemented for GC references that are guaranteed to be rooted:

You can use this to abstract over the different kinds of rooted GC references. Note that Deref<Target = T> is a supertrait for RootedGcRef<T>, so all rooted GC references deref to their underlying T, allowing you to call its methods.

This is a sealed trait, and may not be implemented for any types outside of the wasmtime crate.

Implementors§

Source§

impl<T, U> RootedGcRef<T> for U
where T: GcRef, U: RootedGcRefImpl<T> + Deref<Target = T>,