Trait enso_prelude::ToRef[][src]

pub trait ToRef<T> where
    T: ?Sized
{ fn to_ref(&self) -> &T; }
Expand description

Similar to AsRef but more specific and automatically implemented for every type. Allows for conversion &T to &T (identity) and T to &T for any type T. In contrast, AsRef requires explicit impls, so for example you cannot do let t:&() = ().as_ref()

Required methods

Implementations on Foreign Types

Implementors