unsafe_from 1.0.0

Unsafe versions of standard library `From<T>` and `Into<T>`.
Documentation
  • Coverage
  • 60%
    3 out of 5 items documented2 out of 4 items with examples
  • Size
  • Source code size: 2.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • prostomarkeloff

Unsafe versions of standard library From<T> and Into<T>.

Install

[dependencies]
unsafe_from = "1.0.0"

Use

use unsafe_from::UnsafeFrom;

struct MyUnsafeType(i32);

unsafe impl UnsafeFrom<i32> for MyUnsafeType {
    unsafe fn unsafe_from(t: i32) -> MyUnsafeType {
        MyUnsafeType(t)
    }
}