Trait BikeshedGuaranteedNoDrop

Source
#[doc(hidden)] pub trait BikeshedGuaranteedNoDrop { }
🔬This is a nightly-only experimental API. (bikeshed_guaranteed_no_drop)
Expand description

Marker trait for the types that are allowed in union fields and unsafe binder types.

Implemented for:

  • &T, &mut T for all T,
  • ManuallyDrop<T> for all T,
  • tuples and arrays whose elements implement BikeshedGuaranteedNoDrop,
  • or otherwise, all types that are Copy.

Notably, this doesn’t include all trivially-destructible types for semver reasons.

Bikeshed name for now. This trait does not do anything other than reflect the set of types that are allowed within unions for field validity.

Implementors§