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§
Sourcetype Owned: OwnedToRef<Borrowed<'a> = Self>
where
Self: 'a
type Owned: OwnedToRef<Borrowed<'a> = Self> where Self: 'a
The resulting type after obtaining ownership.
Required Methods§
Sourcefn ref_to_owned(&self) -> Self::Owned
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]
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for &'a [u8]
Available on crate feature
alloc
only.Source§impl<'a, T> RefToOwned<'a> for Option<T>
impl<'a, T> RefToOwned<'a> for Option<T>
type Owned = Option<<T as RefToOwned<'a>>::Owned>
fn ref_to_owned(&self) -> Self::Owned
Implementors§
Source§impl<'a> RefToOwned<'a> for AnyRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for AnyRef<'a>
Available on crate feature
alloc
only.Source§impl<'a> RefToOwned<'a> for BitStringRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for BitStringRef<'a>
Available on crate feature
alloc
only.Source§impl<'a> RefToOwned<'a> for Ia5StringRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for Ia5StringRef<'a>
Available on crate feature
alloc
only.Source§impl<'a> RefToOwned<'a> for IntRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for IntRef<'a>
Available on crate feature
alloc
only.Source§impl<'a> RefToOwned<'a> for OctetStringRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for OctetStringRef<'a>
Available on crate feature
alloc
only.type Owned = OctetString
Source§impl<'a> RefToOwned<'a> for PrintableStringRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for PrintableStringRef<'a>
Available on crate feature
alloc
only.type Owned = PrintableString
Source§impl<'a> RefToOwned<'a> for TeletexStringRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for TeletexStringRef<'a>
Available on crate feature
alloc
only.