[−][src]Trait core_extensions::transparent_newtype::TransparentNewtype
Trait for #[repr(transparent)]
newtypes (stable since Rust 1.28)
which are safe to transmute to/from their contents.
Safety for users of TransparentNewtype types
Look at the module-level documentation
Associated Types
Loading content...Provided methods
fn convert_from(v: Self::Inner) -> Self where
Self: Sized,
Self::Inner: Sized,
Self: Sized,
Self::Inner: Sized,
Converts a T value to Self.
fn convert_ref_from(v: &Self::Inner) -> &Self
Converts a reference to T to a reference to Self.
fn convert_mut_from(v: &mut Self::Inner) -> &mut Self
Converts a mutable reference to T to a mutable reference to Self.
fn convert_into(self) -> Self::Inner where
Self: Sized,
Self::Inner: Sized,
Self: Sized,
Self::Inner: Sized,
Converts self to a T value.
fn convert_ref_to(&self) -> &Self::Inner
Converts a reference to Self to a reference to T.
fn convert_mut_to(&mut self) -> &mut Self::Inner
Converts a mutable reference to Self to a mutable reference to T.