pub enum DropStyle {
    Dead,
    Static,
    Conditional,
    Open,
}
Expand description

Describes how/if a value should be dropped.

Variants

Dead

The value is already dead at the drop location, no drop will be executed.

Static

The value is known to always be initialized at the drop location, drop will always be executed.

Conditional

Whether the value needs to be dropped depends on its drop flag.

Open

An “open” drop is one where only the fields of a value are dropped.

For example, this happens when moving out of a struct field: The rest of the struct will be dropped in such an “open” drop. It is also used to generate drop glue for the individual components of a value, for example for dropping array elements.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 1 byte

Size for each variant:

  • Dead: 0 bytes
  • Static: 0 bytes
  • Conditional: 0 bytes
  • Open: 0 bytes