ToRef

Trait ToRef 

Source
pub trait ToRef {
    type Type<'a>: Clone
       where Self: 'a;

    // Required method
    fn to_ref<'a>(&'a self) -> Self::Type<'a>;

    // Provided method
    fn to_own_lendable<'a>(&'a self) -> Self::Type<'a> { ... }
}

Required Associated Types§

Source

type Type<'a>: Clone where Self: 'a

The dedicated type with references therein.

Required Methods§

Source

fn to_ref<'a>(&'a self) -> Self::Type<'a>

Provided Methods§

Source

fn to_own_lendable<'a>(&'a self) -> Self::Type<'a>

Semantic alias for ToRef::to_ref.

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.

Implementors§