Trait abi_stable::traits::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.

Object Safety§

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§