MakePair
Class-based variant of makePair:
class IntRes extends Lifecycle.MakePair(IO(1000 -> IO.unit))
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Graph
-
- Supertypes
Members list
Type members
Inherited types
Attributes
- Inherited from:
- FromPair
Value members
Constructors
Concrete methods
The action in F used to acquire the resource.
The action in F used to acquire the resource.
Attributes
- Note
-
the
acquireaction is performed uninterruptibly by Lifecycle.SyntaxUse#use and other interpreters, whenFis an effect type that supports interruption/cancellation. - Definition Classes
Inherited methods
Attributes
- Inherited from:
- Lifecycle
Prepend release action to existing
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Either an action in F or a pure function used to extract the A from the InnerResource
Either an action in F or a pure function used to extract the A from the InnerResource
The effect in the Left branch will be performed interruptibly, it is not afforded the same kind of safety as acquire and release actions when F is an effect type that supports interruption/cancellation.
When F is Identity, it doesn't matter whether the output is a Left or Right branch.
When consuming the output of extract you can use _.fold(identity, F.pure) to convert the Either to F[B]
Attributes
- See also
-
Lifecycle.Basic
extractdoesn't have to be defined when inheriting fromLifecycle.Basic - Note
-
the
extractaction is performed interruptibly by Lifecycle.SyntaxUse#use and other interpreters - Definition Classes
- Inherited from:
- FromPair
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
The action in F used to release, close or deallocate the resource after it has been acquired and used through Lifecycle.SyntaxUse#use.
The action in F used to release, close or deallocate the resource after it has been acquired and used through Lifecycle.SyntaxUse#use.
Attributes
- Note
-
the
releaseaction is performed uninterruptibly by Lifecycle.SyntaxUse#use and other interpreters, whenFis an effect type that supports interruption/cancellation. - Definition Classes
- Inherited from:
- FromPair
Attributes
- Inherited from:
- Lifecycle
Attributes
- Inherited from:
- Lifecycle
Wrap acquire action of this resource in another effect, e.g. for logging purposes
Wrap acquire action of this resource in another effect, e.g. for logging purposes
Attributes
- Inherited from:
- Lifecycle
Wrap release action of this resource in another effect, e.g. for logging purposes
Wrap release action of this resource in another effect, e.g. for logging purposes
Attributes
- Inherited from:
- Lifecycle