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.

Attributes

Members list

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
final class ProvideSomeZManagedPartiallyApplied[R0, -R, +E, +A](val self: ZManaged[R, E, A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
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.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed abstract class ZManaged[-R, +E, +A] extends ZManagedVersionSpecific[R, E, A], 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.

Attributes

Companion
object
Supertypes
trait Serializable
trait ZManagedVersionSpecific[R, E, A]
class Object
trait Matchable
class Any
Self type
ZManaged[R, E, A]
object ZManaged

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ZManaged.type
trait ZManagedAspect[+LowerR, -UpperR, +LowerE, -UpperE, +LowerA, -UpperA]

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ZManagedAspect[LowerR, UpperR, LowerE, UpperE, LowerA, UpperA]
final implicit class ZManagedFiberRefSyntax[A](self: FiberRef[A])

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final implicit class ZManagedPromiseCompanionSyntax(self: Promise.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedRefCompanionSyntax(self: Ref.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedRefSynchronizedCompanionSyntax(self: Synchronized.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedTHubSyntax[A](self: THub[A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedTSemaphoreSyntax(self: TSemaphore) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
trait ZManagedVersionSpecific[-R, +E, +A]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ZManaged[R, E, A]
Self type
ZManaged[R, E, A]
final implicit class ZManagedZChannelCompanionSyntax(self: ZChannel.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZChannelSyntax[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone](self: ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZIOAutoCloseableSyntax[R, E, A <: AutoCloseable](self: ZIO[R, E, A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZIOCompanionSyntax(self: ZIO.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZIOSyntax[R, E, A](self: ZIO[R, E, A])

Attributes

Supertypes
class Object
trait Matchable
class Any
final implicit class ZManagedZLayerCompanionSyntax(self: ZLayer.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZLayerSyntax[R, E, A](self: ZLayer[R, E, A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZSinkCompanionSyntax(self: ZSink.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZStreamCompanionSyntax(self: ZStream.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZManagedZStreamSyntax[R, E, A](self: ZStream[R, E, A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Inherited classlikes

final implicit class ZManagedZStreamCompanionPlatformSpecificSyntax(self: ZStream.type)

Attributes

Inherited from:
ZManagedCompatPlatformSpecific (hidden)
Supertypes
class Object
trait Matchable
class Any

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 ZManagedZLayerSyntax[R, E, A](self: ZLayer[R, E, A]): ZManagedZLayerSyntax[R, E, A]
final implicit def ZManagedZStreamSyntax[R, E, A](self: ZStream[R, E, A]): ZManagedZStreamSyntax[R, E, A]

Inherited implicits

Attributes

Inherited from:
ZManagedCompatPlatformSpecific (hidden)