title: What does it mean if trait starts with self: Actor
body: <p>I don't quite a good Scala programmer and need some help with understanding syntax. Here is the <a href="https://github.com/levkhomich/akka-tracing/blob/master/core/src/main/scala/com/github/levkhomich/akka/tracing/ActorTracing.scala" rel="nofollow"><strong><em>trait</em></strong></a> I am struggling with:</p>
  
  <pre><code>trait ActorTracing extends AroundReceiveOverrideHack { self: Actor =&gt;
  
    protected def serviceName: String =
      this.getClass.getSimpleName
  
    implicit def any2response[T](msg: T): ResponseTracingSupport[T] =
      new ResponseTracingSupport(msg)
  
    implicit lazy val trace: TracingExtensionImpl =
      TracingExtension(context.system)
  
    override protected final def aroundReceiveInt(receive: Receive, msg: Any): Unit =
      msg match {
        case ts: BaseTracingSupport if receive.isDefinedAt(msg) =&gt;
          trace.start(ts, serviceName)
        case _ =&gt;
      }
  }
  </code></pre>
  
  <p>It seems that the traits' body starts with <code>Function1</code> literal. <code>self:Actor =&gt;</code>... What would it mean here in this example?</p>