The builders allocate new strings too much due to the Service trait and infernal lifetime problems. One idea would be to have service to take String in and make the Client#send to convert a Payload<'a> to a JSON String; builders and payload would then only hold references to the input data and we'd have only one allocation.
This is a place for experimentation and other ideas how to do this are also appreciated.
The builders allocate new strings too much due to the
Service
trait and infernal lifetime problems. One idea would be to have service to take String in and make theClient#send
to convert aPayload<'a>
to a JSONString
; builders and payload would then only hold references to the input data and we'd have only one allocation.This is a place for experimentation and other ideas how to do this are also appreciated.