pub unsafe trait Emplace<T: DropRaw + Pointee + ?Sized, R: Region> {
    fn emplaced_meta(&self) -> <T as Pointee>::Metadata;
    unsafe fn emplace_unsized_unchecked(self, out: In<Slot<'_, T>, R>);
}
Expand description

A value emplacer.

Safety

  • emplaced_meta must return valid metadata for the value emplaced with emplace_unsized_unchecked.
  • emplace_unsized_unchecked must initialize its out parameter.

Required Methods

Returns the metadata of the T that this emplaces.

For sized T, this is always ().

Emplaces a value into a given slot within some memory region.

Safety

out must have the metadata returned by emplaced_meta.

Implementations on Foreign Types

Implementors