WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
137 stars 47 forks source link

Experiment with a referring API #24

Closed pimeys closed 6 years ago

pimeys commented 6 years ago

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.

pimeys commented 6 years ago

Done in https://github.com/pimeys/a2/pull/25