ContravariantSelf

Trait ContravariantSelf 

Source
pub trait ContravariantSelf<'a, A>
where Self: Contravariant<'a, A, Inner = A, Mapped = Self>, A: 'a,
{ }
Expand description

A Contravariant functor that can be mapped to itself

This trait should be required as bound when the compiler shall infer that the return type of Contravariant::contramap is Self.

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§

Source§

impl<'a, T, A> ContravariantSelf<'a, A> for T
where T: Contravariant<'a, A, Inner = A, Mapped = Self>, A: 'a,