force_copy 0.0.1

A wrapper to force-implement Copy for a type
  • Coverage
  • 0%
    0 out of 6 items documented0 out of 6 items with examples
  • Size
  • Source code size: 3.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Aaron1011
force_copy-0.0.1 doesn't have any documentation.

force_copy

NOTE: This is still WIP.

A Rust crate that allows making a non-Copy type into a Copy type. Simply wrap your type in ForceCopy (e.g. ForceCopy<MyType>) - the resulting type implements Copy, and can be used in a #[derive(Copy] struct.

Limitations

The wrapped type must not have a destructor - this is a language-level limitation which cannot be circumvented. To ignore the destructor of a type, wrap it in ManuallyDrop (e.g. ForceCopy<ManuallyDrop<String>>).