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

    // Required method
    fn owned_to_ref(&self) -> Self::Borrowed<'_>;
}
Available on crate feature pkcs8 only.
Expand description

A trait for borrowing data from an owned struct

Required Associated Types§

type Borrowed<'a> where Self: 'a

The resulting type referencing back to Self

Required Methods§

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

Creates a new object referencing back to the self for storage

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl OwnedToRef for Box<[u8]>

§

type Borrowed<'a> = &'a [u8]

§

fn owned_to_ref(&self) -> <Box<[u8]> as OwnedToRef>::Borrowed<'_>

§

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) -> <Option<T> as OwnedToRef>::Borrowed<'_>

Implementors§