Target types

No target types have been named yet, even frames have only been called just that without elaborating what their exact type is. The following table lists all target types, which lifetime is used for 'target, and whether it's a rooting target or not.

TypeRooting
LocalGcFrame<'target>Yes
&mut LocalGcFrame<'target>Yes
UnsizedLocalGcFrame<'target>Yes
&mut UnsizedLocalGcFrame<'target>Yes
LocalOutput<'target>Yes
&'target mut LocalOutputYes
LocalReusableSlot<'target>Yes
&mut LocalReusableSlot<'target>Yes1
GcFrame<'target>Yes
&mut GcFrame<'target>Yes
Output<'target>Yes
&'target mut OutputYes
ReusableSlot<'target>Yes
&mut ReusableSlot<'target>Yes1
AsyncGcFrame<'target>Yes
&mut AsyncGcFrame<'target>Yes
UnrootedNo
StackHandle<'target>No
Pin<&'target mut WeakHandle>No
ActiveHandle<'target>No
&Tgt where Tgt: Target<'target>No

These targets belong to three different groups: local targets, dynamic targets, and non-rooting targets.

1

While a mutable reference to a (Local)ReusableSlot roots the data, it assigns the scope's lifetime to the result which allows the result to live until we leave the scope. This slot can be reused, though, so the data is not guaranteed to remain rooted for the entire 'target lifetime. For this reason an unrooted reference is returned.