gclient::ext::sp_runtime::app_crypto

Trait IsWrappedBy

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§

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

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

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§

§

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