pub unsafe trait FromImpl<T> {
// Required methods
fn from_impl(value: &T) -> &Self;
fn from_impl_mut(value: &mut T) -> &mut Self;
}Expand description
Trait for converting a sized type to an unsized one.
On stable Rust (with the ptr_meta crate feature), it can
be implemented via the impl_from_impl
macro. On nightly, it is implemented for all Unsize,
and the impl_from_impl macro does nothing.
§Safety
from_impl and from_impl_mut must return the argument, coerced to the unsized type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".