This commit makes the following changes
- Add an opaque `Debug` impl for `Client`.
- Add a rich `Debug` impl for `Row`.
- Make the `Debug` impl for `Type` clearer.
- Change the `Debug` for `Column` to be slightly neater.
We have to make the trait methods differ from the normal methods a bit
by adding Sync + Send bounds to the ToStatement parameter which is a bit
unfortunate, but necessary until GATs async_trait unnecessary.
Closes#357
Rather than taking in a Stream and advancing it internally, return a
Sink that can be advanced by the calling code. This significantly
simplifies encoding logic for things like tokio-postgres-binary-copy.
Similarly, the blocking interface returns a Writer.
Closes#489
Benchmarks indicate that malloc accounts for a significant amount of the
runtime of queries. The message buffer accounts for ~half of that (the
other being channels), and this change should eliminate it.
This is the template that we'll use for all other methods taking
parameters. The `foo_raw` variant is the most flexible (but annoying to
use), while `foo` covers the expected common case.
Change the slice-consuming methods to requiring &(dyn ToSql + Sync),
which makes the overall value Send. If you have non-Sync values for
whatever reason, you can still use the iterator-based methods.