pub trait IsWrappedBy<Outer>: From<Outer> + Into<Outer> {
    // Required methods
    fn from_ref(outer: &Outer) -> &Self;
    fn from_mut(outer: &mut Outer) -> &mut Self;
}
Expand description

One type is wrapped by another.

Required Methods§

source

fn from_ref(outer: &Outer) -> &Self

Get a reference to the inner from the outer.

source

fn from_mut(outer: &mut Outer) -> &mut Self

Get a mutable reference to the inner from the outer.

Implementors§

source§

impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<Self> + AsMut<Self> + From<Self>, T: From<Outer>,