CanPerform
Type members
Types
Inherited types
type ThisEffect
Abstract type that must be used in definitions of effect's operations.
Abstract type that must be used in definitions of effect's operations.
From the perspective of effect's user, ThisEffect is just an alias of this.type
. The final-override happens in Effect.
From the perspective of handler, ThisEffect definition is enriched in a way depending on the chosen Interpreter.
- Inherited from:
- Signature
Value members
Concrete methods
final def perform[A, U <: ThisEffect](f: Z & Signature { type ThisEffect = U; } => A !@! U { def apply(z: Z & Signature { type ThisEffect = U; }): A !@! U; }): Computation[A, U]
Lifts an invocation of this Signature's method into the Computation monad.
Lifts an invocation of this Signature's method into the Computation monad.
The purpose of perform
is similar to:
send
function form various effect systems (Eff monad, etc.)serviceWith
from ZIO 1.x.serviceWithZIO
from ZIO 2.x.
⚠️ Scaladoc displays the definition of perform as more complex than it actually is:
final def perform[A, U <: ThisEffect](f: (z: Z & Signature { type ThisEffect = U }) => z.!@![A, U]): A !! U