Created
October 30, 2015 18:49
-
-
Save trane/1eaddb374006d4629bef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Binder[A] { | |
def name(a: A): String | |
def hosts(a: A): String | |
} | |
implicit object LoginManagerBinder extends Binder[LoginManager] { | |
def name(manager: LoginManager): String = | |
manager.name | |
def hosts(manager: LoginManager): String = | |
manager.host | |
} | |
case class BindRequest[A : Binder](context: A, req: Request) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment