I am reading akka-http source codes, here is source code of akka.http.scaladsl.server.directives.RouteDirectives
, take the complete
method as example, can anybody tell what's meaning of the underscore in StandardRoute(_.complete(m))
?
package akka.http.scaladsl.server
package directives
import akka.http.scaladsl.marshalling.ToResponseMarshallable
import akka.http.scaladsl.model._
import StatusCodes._
/**
* @groupname route Route directives
* @groupprio route 200
*/
trait RouteDirectives {
....
....
/**
* Completes the request using the given arguments.
*
* @group route
*/
def complete(m: ⇒ ToResponseMarshallable): StandardRoute =
StandardRoute(_.complete(m))
}
object RouteDirectives extends RouteDirectives {
private val _reject = StandardRoute(_.reject())
}