class Has <M, Env, VALUE> Source #
where
Env : Has<M, VALUE>
Strongly typed way of accessing a Has
trait interface from an environment
When using multiple Has
traits, the accessor (Env.Trait
) will cause ambiguity errors.
This type resolves that by forcing qualification via the type parameters. It also has
the benefit that we cache the trait interface in a readonly static, saving on allocations.
Parameters
type | M | Higher-kind |
type | Env | The environment type from which to get the trait-interface value |
type | VALUE | Trait interface type |
Fields
field K<M, VALUE> ask = Env.Ask Source #
Cached trait interface accessor