provideLayer method

ZIO<R, E, A> provideLayer(
  1. Layer<E, dynamic> layer
)

Provide the ZIO with a Layer, building it and adding it into the context.

If the Layer already exists in the context, it will be replaced.

Implementation

ZIO<R, E, A> provideLayer(Layer<E, dynamic> layer) =>
    ZIO.from((ctx) => ctx.provideLayer(layer).zipRight(this).unsafeRun(ctx));