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§

source

type Borrowed<'a> where Self: 'a

The resulting type referencing back to Self

Required Methods§

source

fn owned_to_ref(&self) -> Self::Borrowed<'_>

Creates a new object referencing back to the self for storage

Implementations on Foreign Types§

source§

impl<T> OwnedToRef for Option<T>where T: OwnedToRef,

§

type Borrowed<'a> where T: 'a = Option<<T as OwnedToRef>::Borrowed<'a>>

source§

fn owned_to_ref(&self) -> Self::Borrowed<'_>

Implementors§

source§

impl OwnedToRef for Any

Available on crate feature alloc only.
§

type Borrowed<'a> = AnyRef<'a>

source§

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.
§

type Borrowed<'a> = Ia5StringRef<'a>

source§

impl OwnedToRef for Int

Available on crate feature alloc only.
§

type Borrowed<'a> = IntRef<'a>

source§

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.
source§

impl OwnedToRef for TeletexString

Available on crate feature alloc only.
source§

impl OwnedToRef for Uint

Available on crate feature alloc only.
§

type Borrowed<'a> = UintRef<'a>