object Default extends DefaultInstances0
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Default
- DefaultInstances0
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- type WithContext[R0, E0, A] = Default[A] { ... /* 2 definitions in type refinement */ }
- implicit final class ZLayerDefaultInvariantOps[R, E, A] extends AnyVal
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[A](implicit ev: Default[A]): WithContext[R, E, A]
Summons the implicit default for the specified type.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit def defaultPromiseNothing[A](implicit arg0: Tag[A], trace: Trace): WithContext[Any, Nothing, Promise[Nothing, A]]
- Definition Classes
- DefaultInstances0
- implicit def deriveDefaultConfig[A](implicit arg0: Tag[A], ev: Config[A], trace: Trace): WithContext[Any, Error, A]
- implicit def deriveDefaultHub[A](implicit arg0: Tag[A], trace: Trace): WithContext[Any, Nothing, Hub[A]]
- implicit def deriveDefaultPromise[E, A](implicit arg0: Tag[E], arg1: Tag[A], trace: Trace): WithContext[Any, Nothing, Promise[E, A]]
- implicit def deriveDefaultQueue[A](implicit arg0: Tag[A], trace: Trace): WithContext[Any, Nothing, Queue[A]]
- implicit def deriveDefaultRef[A](implicit arg0: Tag[A], ev: Default[A], trace: Trace): WithContext[R, E, Ref[A]]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromLayer[R0, E0, A](zlayer: => ZLayer[R0, E0, A])(implicit arg0: Tag[A], trace: Trace): WithContext[R0, E0, A]
Uses the provided layer as the default layer.
- def fromZIO[R, E, A](zio: => ZIO[R, E, A])(implicit arg0: Tag[A], trace: Trace): WithContext[R, E, A]
Constructs a default layer using the provided ZIO value.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def service[A](implicit arg0: Tag[A], trace: Trace): WithContext[A, Nothing, A]
Makes a default value that requires the specified service from the environment.
Makes a default value that requires the specified service from the environment.
Used to discard a predefined Default instance for ZLayer.derive.
class Wheels(number: Int) object Wheels { implicit val defaultWheels: ZLayer.Default.WithContext[Any, Nothing, Wheels] = ZLayer.Default.succeed(new Wheels(4)) } class Car(wheels: Wheels) val carLayer1: ULayer[Car] = ZLayer.derive // wheels.number == 4 val carLayer2: URLayer[Wheels, Car] = locally { // The default instance is discarded implicit val newWheels: ZLayer.Default.WithContext[Wheels, Nothing, Wheels] = ZLayer.Default.service[Wheels] ZLayer.derive[Car] }
Example: - def succeed[A](a: => A)(implicit arg0: Tag[A], trace: Trace): WithContext[Any, Nothing, A]
Constructs a default layer using the provided value.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()