cats.Inject
See theInject companion object
Inject is a type class providing an injection from type A
into type B
. An injection is a function inj
which does not destroy any information: for every b: B
there is at most one a: A
such that inj(a) = b
.
Because of this all injections admit partial inverses prj
which pair a value b: B
back with a single value a: A
.
Attributes
- See also
-
InjectK for injection for cats.data.EitherK
- Since
-
1.0
- Note
-
Prior to cats 1.0, Inject handled injection for type constructors. For injection of type constructors, use InjectK.
- Companion
- object
- Source
- Inject.scala
- Graph
-
- Supertypes
Members list
In this article