zio.managed

package zio.managed

The Managed library provides the ZManaged data type for backward compatibility after the introduction of scopes. For the best experience, import zio.managed._ to get access to extension methods on ZIO data types that convert to and from ZManaged values. This will give you the smoothest possible experience until you are able to upgrade to using scopes directly.

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

final class ProvideSomeZManagedPartiallyApplied[R0, -R, +E, +A](val self: ZManaged[R, E, A]) extends AnyVal
final case class Reservation[-R, +E, +A](acquire: ZIO[R, E, A], release: Exit[Any, Any] => URIO[R, Any])

A Reservation[-R, +E, +A] encapsulates resource acquisition and disposal without specifying when or how that resource might be used.

A Reservation[-R, +E, +A] encapsulates resource acquisition and disposal without specifying when or how that resource might be used.

See ZManaged#reserve and ZIO#reserve for details of usage.

sealed abstract class ZManaged[-R, +E, +A] extends ZManagedVersionSpecific[R, E, A] with Serializable

A ZManaged[R, E, A] is a managed resource of type A, which may be used by invoking the use method of the resource. The resource will be automatically acquired before the resource is used, and automatically released after the resource is used.

A ZManaged[R, E, A] is a managed resource of type A, which may be used by invoking the use method of the resource. The resource will be automatically acquired before the resource is used, and automatically released after the resource is used.

Resources do not survive the scope of use, meaning that if you attempt to capture the resource, leak it from use, and then use it after the resource has been consumed, the resource will not be valid anymore and may fail with some checked error, as per the type of the functions provided by the resource.

Companion:
object
object ZManaged
Companion:
class
trait ZManagedAspect[+LowerR, -UpperR, +LowerE, -UpperE, +LowerA, -UpperA]
final implicit class ZManagedFiberRefSyntax[A](self: FiberRef[A])
final implicit class ZManagedPromiseCompanionSyntax(self: Promise.type) extends AnyVal
final implicit class ZManagedRefCompanionSyntax(self: Ref.type) extends AnyVal
final implicit class ZManagedRefSynchronizedCompanionSyntax(self: Synchronized.type) extends AnyVal
final implicit class ZManagedTHubSyntax[A](self: THub[A]) extends AnyVal
final implicit class ZManagedTSemaphoreSyntax(self: TSemaphore) extends AnyVal
trait ZManagedVersionSpecific[-R, +E, +A]
final implicit class ZManagedZChannelCompanionSyntax(self: ZChannel.type) extends AnyVal
final implicit class ZManagedZChannelSyntax[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone](self: ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone]) extends AnyVal
final implicit class ZManagedZIOAutoCloseableSyntax[R, E, A <: AutoCloseable](self: ZIO[R, E, A]) extends AnyVal
final implicit class ZManagedZIOCompanionSyntax(self: ZIO.type) extends AnyVal
final implicit class ZManagedZIOSyntax[R, E, A](self: ZIO[R, E, A])
final implicit class ZManagedZLayerCompanionSyntax(self: ZLayer.type) extends AnyVal
final implicit class ZManagedZSinkCompanionSyntax(self: ZSink.type) extends AnyVal
final implicit class ZManagedZStreamCompanionSyntax(self: ZStream.type) extends AnyVal
final implicit class ZManagedZStreamSyntax[R, E, A](self: ZStream[R, E, A]) extends AnyVal

Inherited classlikes

Types

type Managed[+E, +A] = ZManaged[Any, E, A]
type RManaged[-R, +A] = ZManaged[R, Throwable, A]
type TaskManaged[+A] = ZManaged[Any, Throwable, A]
type UManaged[+A] = ZManaged[Any, Nothing, A]
type URManaged[-R, +A] = ZManaged[R, Nothing, A]

Implicits

Implicits

final implicit def ZManagedFiberRefSyntax[A](self: FiberRef[A]): ZManagedFiberRefSyntax[A]
final implicit def ZManagedTHubSyntax[A](self: THub[A]): ZManagedTHubSyntax[A]
final implicit def ZManagedZChannelSyntax[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone](self: ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone]): ZManagedZChannelSyntax[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone]
final implicit def ZManagedZIOAutoCloseableSyntax[R, E, A <: AutoCloseable](self: ZIO[R, E, A]): ZManagedZIOAutoCloseableSyntax[R, E, A]
final implicit def ZManagedZIOSyntax[R, E, A](self: ZIO[R, E, A]): ZManagedZIOSyntax[R, E, A]
final implicit def ZManagedZStreamSyntax[R, E, A](self: ZStream[R, E, A]): ZManagedZStreamSyntax[R, E, A]

Inherited implicits

Inherited from:
ZManagedCompatPlatformSpecific (hidden)