unsafe_from

Crates.iounsafe_from
lib.rsunsafe_from
version1.0.0
sourcesrc
created_at2020-08-20 17:17:05.997378
updated_at2020-08-20 17:17:05.997378
descriptionUnsafe versions of standard library `From` and `Into`.
homepage
repository
max_upload_size
id278853
size2,868
prostomarkeloff (prostomarkeloff)

documentation

README

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)
    }
}
Commit count: 0

cargo fmt