Crates.io | unsafe_from |
lib.rs | unsafe_from |
version | 1.0.0 |
source | src |
created_at | 2020-08-20 17:17:05.997378 |
updated_at | 2020-08-20 17:17:05.997378 |
description | Unsafe versions of standard library `From |
homepage | |
repository | |
max_upload_size | |
id | 278853 |
size | 2,868 |
Unsafe versions of standard library From<T>
and Into<T>
.
[dependencies]
unsafe_from = "1.0.0"
use unsafe_from::UnsafeFrom;
struct MyUnsafeType(i32);
unsafe impl UnsafeFrom<i32> for MyUnsafeType {
unsafe fn unsafe_from(t: i32) -> MyUnsafeType {
MyUnsafeType(t)
}
}