#deprecated #destructor #drop #unions #untagged #maybe-uninit #nodrop

deprecated nightly nodrop-union

A wrapper type to inhibit drop (destructor). Implementation crate for nodrop, the untagged unions implementation (which is unstable / requires nightly) as of this writing. ***Deprecated: Use ManuallyDrop or MaybeUninit instead!***

4 releases

Uses old Rust 2015

0.1.11 Oct 9, 2019
0.1.10 Nov 12, 2018
0.1.9 Sep 8, 2016
0.1.8 Sep 6, 2016

#134 in #deprecated

Download history 24/week @ 2023-11-20 30/week @ 2023-11-27 16/week @ 2023-12-04 19/week @ 2023-12-11 19/week @ 2023-12-18 12/week @ 2023-12-25 2/week @ 2024-01-01 24/week @ 2024-01-08 14/week @ 2024-01-15 17/week @ 2024-01-22 10/week @ 2024-01-29 19/week @ 2024-02-05 27/week @ 2024-02-12 41/week @ 2024-02-19 62/week @ 2024-02-26 52/week @ 2024-03-04

185 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

7KB
97 lines

Recent Changes (nodrop-union)

  • 0.1.11

    • Mark nodrop deprecated

      With the release of arrayvec 0.5, nodrop is unused.

      With the release of Rust 1.36 and MaybeUninit, nodrop-union has no purpose at all (it was only for nightly releases).

  • 0.1.10

    • Update to include license files in the crate by @ignatenkobrain
  • 0.1.9

    • Add Copy, Clone implementations
  • 0.1.8

    • Initial release

lib.rs:

A wrapper type to inhibit drop (destructor).

Deprecated: Use ManuallyDrop or MaybeUninit instead!

nodrop-union is the untagged unions (requires Rust nightly channel and unstable as of this writing) implementation for the nodrop crate.

It is intended you use this through the nodrop crate with the use_union crate feature enabled.

This is the future implementation of nodrop, once it is stable.

This implementation is a lot better:

  • Does not have a destructor at all
  • Can be Copy if T is Copy
  • No space overhead / no runtime flag

This means that this implementation has extensions that the stable nodrop does not yet have, which is something to be aware of if you are switching.

No runtime deps