Priority

sealed trait Priority[+P, +F]

Priority is a type class for prioritized implicit search.

This type class will attempt to provide an implicit instance of P (the preferred type). If that type is not available it will fallback to F (the fallback type). If neither type is available then a Priority[P, F] instance will not be available.

This type can be useful for problems where multiple algorithms can be used, depending on the type classes available.

Companion:
object
class Object
trait Matchable
class Any
class Fallback[F]
class Preferred[P]

Value members

Concrete methods

def bimap[P2, F2](f1: P => P2)(f2: F => F2): Priority[P2, F2]
def fold[B](f1: P => B)(f2: F => B): B
def getFallback: Option[F]
def getPreferred: Option[P]
def isFallback: Boolean
def isPreferred: Boolean
def join[U >: P & F]: U
def toEither: Either[P, F]