Skip to main content

NoDrop

Trait NoDrop 

Source
pub unsafe trait NoDrop { }
Expand description

A marker trait indicating it’s OK to not drop an instance of that type.

The MemoryAllocator allocates memory for objects and return a pointer or reference to the allocated memory. While doing so, it does NOT maintain the type or destructors of allocated objects, and does not call their destructor (if exit). This trait marks types that can safely be not dropped.

§Safety

When implementing this trait for a type, the user must ensure the type does not implement the Drop trait.

Implementors§

Source§

impl<T: SpanElement> NoDrop for Span<'_, T>

Source§

impl<T: Copy> NoDrop for T

Source§

impl<T: Storable> NoDrop for Storage<T>