scope

package scope

Type members

Classlikes

trait InScope[S <: Scope]

Mark the child class as part of specified scope. Avoid hierarchies. Use this just as a convenient method to avoid the implicit val declaration.

Mark the child class as part of specified scope. Avoid hierarchies. Use this just as a convenient method to avoid the implicit val declaration.


 case class EntityModel(value: String)
 object EntityModel {
     implicit val mapper: ModelMapper[Scope.Persistence, EntityModel, DomainModel] =
       ModelMapper.scoped[Scope.Persistence]{ entity => ??? }
 }


 case class DomainModel(value: String)
 case class MyRepo() extends InScope[Scope.Persistence]{

     def foo = {
       val entity: EntityModel = ???
       val domain: DomainModel = entity.scoped.as[DomainModel]
     }
 }
Type Params
S

Scope type

@implicitNotFound(msg = "Cannot find a mapper for the scope ${S}") @implicitAmbiguous(msg = "Multiple mapper for the same type ${M2} and same scope ${S}")
class ModelMapperK[F[_], S <: Scope, A, B](val mapper: Kleisli[F, A, B])
Companion
object
Companion
class
trait Scope
Companion
object
object Scope
Companion
class
sealed
Companion
object
Companion
class
sealed
object syntax extends ModelScopeMapperSyntax

Types

type ModelMapper[S <: Scope, A, B] = ModelMapperK[Id, S, A, B]