code: func (n *Notification) EncodeMsg(w *msgp.Writer) error {
  	var bm msgp.Encodable
  
  	if n.Body != nil {
  		var ok bool
  		bm, ok = n.Body.(msgp.Encodable)
  		if !ok {
  			return ErrNotEncodable
  		}
  	}
  
  	var err error
  
  	if err = w.WriteArrayHeader(NotificationPackSize); err != nil {
  		return err
  	}
  
  	if err = w.WriteInt(NotificationType); err != nil {
  		return err
  	}
  
  	if err = w.WriteString(n.Method); err != nil {
  		return err
  	}
  
  	// No body to encode. Write a zero-length params array.
  	if bm == nil {
  		return w.WriteArrayHeader(0)
  	}
  
  	// 1-item array containing the body.
  	if err = w.WriteArrayHeader(1); err != nil {
  		return err
  	}
  
  	return msgp.Encode(w, bm)
  }
docs: // EncodeMsg encodes the notification to writer. The body is expected to
  // be an encodable type.