[−][src]Trait unsafe_from::UnsafeFrom
Unsafe version of From<T>
trait from std
.
Implementing this trait also gives you UnsafeInto
freely.
Example
use unsafe_from::UnsafeFrom; struct MyUnsafeType(i32); unsafe impl UnsafeFrom<i32> for MyUnsafeType { unsafe fn unsafe_from(t: i32) -> MyUnsafeType { MyUnsafeType(t) } }