izumi.distage.framework.services.ResourceRewriter
See theResourceRewriter companion object
Rewrites bindings implemented with _ <: AutoCloseable
into resource bindings that automatically close the implementation closeable.
class XImpl extends AutoCloseable
make[X].from[XImpl]
becomes:
make[X].fromResource {
ClassConstructor[XImpl].map(distage.Lifecycle.fromAutoCloseable(_))
}
Will produce warnings for all rewritten bindings, so better explicitly use .fromResource
!
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait PlanningHookclass Objecttrait Matchableclass Any