abi_stable::traits

Trait IntoOwned

Source
pub trait IntoOwned: Copy + Deref {
    type ROwned: Borrow<Self::Target>;

    // Required method
    fn into_owned(self) -> Self::ROwned;
}
Expand description

For cloning a reference-like type into a (preferably ffi-safe) owned type.

Required Associated Types§

Source

type ROwned: Borrow<Self::Target>

The owned equivalent of this type.

Required Methods§

Source

fn into_owned(self) -> Self::ROwned

Performs the colne.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Clone> IntoOwned for &T

Source§

type ROwned = T

Source§

fn into_owned(self) -> T

Implementors§