Module eso::unify [−][src]
Expand description
Type-level machinery to allow Eso::unify
to work.
The Unify
trait specifies the rules how two Maybe
types can be merged:
This … | … unifies with … | … containing … | … producing … |
---|---|---|---|
An<A> | An<A> | same inner type | An<A> |
No<A> | An<B> | any type | An<B> |
An<A> | No<B> | any type | An<A> |
No<A> | No<B> | any type | No<A> |
This module also provides the utility trait Unify3
that
contains the ugly type manipulations to apply the Unify
rules
between three types.
Traits
Unify | A type |
Unify3 | Shorthand for unifying three types by applying |