Skip to main content

Module drop

Module drop 

Source
Expand description

Drop behavior classification.

Drop behavior specifies whether dropping a type runs custom drop cod3, automatic drop glue, or neither.

In particular, if a type is [CustomDrop<NoDrop>>], it is guaranteed that no inner field of the type will run any drop glue. This can be used inside a custom drop implementation to safely take the value out of a mutable reference in a generic context without a risk of a double free.

Structs§

CustomDrop
The type has a custom Drop implementation, with the given drop behavior for its contents.

Enums§

AutoDrop
Owned contents need automatic drop glue.
NoDrop
Dropping this type does not run drop glue.

Traits§

DropKind