Attributes
- Companion
- object
- Source
- redis.scala
- Graph
-
- Supertypes
Members list
Type members
Types
Attributes
- Source
- redis.scala
Value members
Concrete methods
Attributes
- Definition Classes
- Source
- redis.scala
Inherited methods
Attributes
- Inherited from:
- Module
- Source
- modules.scala
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Exports
Defined exports
Given a Resource
, possibly built by composing multiple Resource
s monadically, returns the acquired resource, as well as an action that runs all the finalizers for releasing it.
Given a Resource
, possibly built by composing multiple Resource
s monadically, returns the acquired resource, as well as an action that runs all the finalizers for releasing it.
If the outer F
fails or is interrupted, allocated
guarantees that the finalizers will be called. However, if the outer F
succeeds, it's up to the user to ensure the returned F[Unit]
is called once A
needs to be released. If the returned F[Unit]
is not called, the finalizers will not be run.
For this reason, this is an advanced and potentially unsafe api which can cause a resource leak if not used correctly, please prefer use as the standard way of running a Resource
program.
Use cases include interacting with side-effectful apis that expect separate acquire and release actions (like the before
and after
methods of many test frameworks), or complex library code that needs to modify or move the finalizer for an existing resource.
Attributes
- Source
- Resource.scala
Given a Resource
, possibly built by composing multiple Resource
s monadically, returns the acquired resource, as well as a cleanup function that takes an exit case and runs all the finalizers for releasing it.
Given a Resource
, possibly built by composing multiple Resource
s monadically, returns the acquired resource, as well as a cleanup function that takes an exit case and runs all the finalizers for releasing it.
If the outer F
fails or is interrupted, allocated
guarantees that the finalizers will be called. However, if the outer F
succeeds, it's up to the user to ensure the returned ExitCode => F[Unit]
is called once A
needs to be released. If the returned ExitCode => F[Unit]
is not called, the finalizers will not be run.
For this reason, this is an advanced and potentially unsafe api which can cause a resource leak if not used correctly, please prefer use as the standard way of running a Resource
program.
Use cases include interacting with side-effectful apis that expect separate acquire and release actions (like the before
and after
methods of many test frameworks), or complex library code that needs to modify or move the finalizer for an existing resource.
Attributes
- Source
- Resource.scala
Attributes
- Source
- Resource.scala
Applies an effectful transformation to the allocated resource. Like a flatMap
on F[A]
while maintaining the resource context
Applies an effectful transformation to the allocated resource. Like a flatMap
on F[A]
while maintaining the resource context
Attributes
- Source
- Resource.scala
Applies an effectful transformation to the allocated resource. Like a flatTap
on F[A]
while maintaining the resource context
Applies an effectful transformation to the allocated resource. Like a flatTap
on F[A]
while maintaining the resource context
Attributes
- Source
- Resource.scala
Implementation for the flatMap
operation, as described via the cats.Monad
type class.
Implementation for the flatMap
operation, as described via the cats.Monad
type class.
Attributes
- Source
- Resource.scala
Given a mapping function, transforms the resource provided by this Resource.
Given a mapping function, transforms the resource provided by this Resource.
This is the standard Functor.map
.
Attributes
- Source
- Resource.scala
For a resource that allocates an action (type F[B]
), allocate that action, run it and release it.
For a resource that allocates an action (type F[B]
), allocate that action, run it and release it.
Attributes
- Source
- Resource.scala
Creates a FunctionK that, when applied, will allocate the resource and use it to run the given Kleisli.
Creates a FunctionK that, when applied, will allocate the resource and use it to run the given Kleisli.
Attributes
- Source
- Resource.scala