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

    // Required method
    fn ref_to_owned(&self) -> Self::Owned;
}
Available on crate feature pkcs8 only.
Expand description

A trait for cloning a referenced structure and getting owned objects

This is the pendant to OwnedToRef

Required Associated Types§

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

The resulting type after obtaining ownership.

Required Methods§

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

Creates a new object taking ownership of the data

Implementations on Foreign Types§

§

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

§

type Owned = Box<[u8]>

§

fn ref_to_owned(&self) -> <&'a [u8] as RefToOwned<'a>>::Owned

§

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

§

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

§

fn ref_to_owned(&self) -> <Option<T> as RefToOwned<'a>>::Owned

Implementors§

§

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

§

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

§

impl<'a> RefToOwned<'a> for SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>

§

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

§

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

§

type Owned = Int

§

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

§

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

§

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

§

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

§

type Owned = Uint

§

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

§

type Owned = Any