Skip to main content

CustomInto

Trait CustomInto 

Source
pub unsafe trait CustomInto<T> {
    // Required method
    unsafe fn custom_into(self) -> T;
}
Expand description

Very similar to the Into trait, but we can implement it on foreign types.

Required Methods§

Source

unsafe fn custom_into(self) -> T

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CustomInto<()> for ()

Source§

unsafe fn custom_into(self)

Source§

impl CustomInto<*mut i8> for String

Source§

unsafe fn custom_into(self) -> *mut i8

Source§

impl CustomInto<String> for *mut i8

Source§

unsafe fn custom_into(self) -> String

Source§

impl CustomInto<bool> for bool

Source§

unsafe fn custom_into(self) -> bool

Source§

impl CustomInto<f64> for *mut f64

Source§

unsafe fn custom_into(self) -> f64

Source§

impl CustomInto<i32> for *mut i32

Source§

unsafe fn custom_into(self) -> i32

Source§

impl<'a> CustomInto<&'a str> for *mut i8

Source§

unsafe fn custom_into(self) -> &'a str

Source§

impl<T1, T2> CustomInto<(*mut T1, usize)> for Vec<T2>
where T2: CustomInto<T1>,

Source§

unsafe fn custom_into(self) -> (*mut T1, usize)

Source§

impl<T1, T2> CustomInto<Option<T1>> for *mut T2
where *mut T2: CustomInto<T1>,

Source§

unsafe fn custom_into(self) -> Option<T1>

Source§

impl<T1, T2> CustomInto<Vec<T1>> for Vec<T2>
where T2: CustomInto<T1>,

Source§

unsafe fn custom_into(self) -> Vec<T1>

Implementors§