pub trait OwnedToRef {
type Borrowed<'a>
where Self: 'a;
// Required method
fn owned_to_ref(&self) -> Self::Borrowed<'_>;
}
Expand description
A trait for borrowing data from an owned struct
Required Associated Types§
Required Methods§
Sourcefn owned_to_ref(&self) -> Self::Borrowed<'_>
fn owned_to_ref(&self) -> Self::Borrowed<'_>
Creates a new object referencing back to the self for storage
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 OwnedToRef for Box<[u8]>
Available on crate feature alloc
only.
impl OwnedToRef for Box<[u8]>
Available on crate feature
alloc
only.Source§impl<T> OwnedToRef for Option<T>where
T: OwnedToRef,
impl<T> OwnedToRef for Option<T>where
T: OwnedToRef,
type Borrowed<'a> = Option<<T as OwnedToRef>::Borrowed<'a>> where T: 'a
fn owned_to_ref(&self) -> Self::Borrowed<'_>
Implementors§
Source§impl OwnedToRef for Any
Available on crate feature alloc
only.
impl OwnedToRef for Any
Available on crate feature
alloc
only.Source§impl OwnedToRef for BitString
Available on crate feature alloc
only.
impl OwnedToRef for BitString
Available on crate feature
alloc
only.type Borrowed<'a> = BitStringRef<'a>
Source§impl OwnedToRef for Ia5String
Available on crate feature alloc
only.
impl OwnedToRef for Ia5String
Available on crate feature
alloc
only.type Borrowed<'a> = Ia5StringRef<'a>
Source§impl OwnedToRef for Int
Available on crate feature alloc
only.
impl OwnedToRef for Int
Available on crate feature
alloc
only.Source§impl OwnedToRef for OctetString
Available on crate feature alloc
only.
impl OwnedToRef for OctetString
Available on crate feature
alloc
only.type Borrowed<'a> = OctetStringRef<'a>
Source§impl OwnedToRef for PrintableString
Available on crate feature alloc
only.
impl OwnedToRef for PrintableString
Available on crate feature
alloc
only.type Borrowed<'a> = PrintableStringRef<'a>
Source§impl OwnedToRef for TeletexString
Available on crate feature alloc
only.
impl OwnedToRef for TeletexString
Available on crate feature
alloc
only.