Trait der::referenced::RefToOwned

source ·
pub trait RefToOwned<'a> {
    type Owned: OwnedToRef<Borrowed<'a> = Self>
       where Self: 'a;

    // Required method
    fn ref_to_owned(&self) -> Self::Owned;
}
Expand description

A trait for cloning a referenced structure and getting owned objects

This is the pendant to OwnedToRef

Required Associated Types§

source

type Owned: OwnedToRef<Borrowed<'a> = Self> where Self: 'a

The resulting type after obtaining ownership.

Required Methods§

source

fn ref_to_owned(&self) -> Self::Owned

Creates a new object taking ownership of the data

Implementations on Foreign Types§

source§

impl<'a> RefToOwned<'a> for &'a [u8]

§

type Owned = Box<[u8]>

source§

fn ref_to_owned(&self) -> Self::Owned

source§

impl<'a, T> RefToOwned<'a> for Option<T>
where T: RefToOwned<'a> + 'a, T::Owned: OwnedToRef,

§

type Owned = Option<<T as RefToOwned<'a>>::Owned>

source§

fn ref_to_owned(&self) -> Self::Owned

Implementors§

source§

impl<'a> RefToOwned<'a> for AnyRef<'a>

§

type Owned = Any

source§

impl<'a> RefToOwned<'a> for BitStringRef<'a>

source§

impl<'a> RefToOwned<'a> for Ia5StringRef<'a>

source§

impl<'a> RefToOwned<'a> for IntRef<'a>

§

type Owned = Int

source§

impl<'a> RefToOwned<'a> for OctetStringRef<'a>

source§

impl<'a> RefToOwned<'a> for PrintableStringRef<'a>

source§

impl<'a> RefToOwned<'a> for TeletexStringRef<'a>

source§

impl<'a> RefToOwned<'a> for UintRef<'a>

§

type Owned = Uint