skunk.util.Recycler
See theRecycler companion object
final case class Recycler[F[_], A](run: A => F[Boolean]) extends A => F[Boolean]
Encapsulates a function that consumes a value and produces a computation that peforms some operation and yields true
on success and false
on failure. Intended use is with resource pools, where you may wish to do a health check or reset some state when a value is handed back in (or yield false
, indicating that the value should be discarded). The only point to this encapsulation is that it allows us to define a monoid!
Attributes
- Companion
- object
- Source
- Recycler.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait A => F[Boolean]class Objecttrait Matchableclass Any
Members list
In this article