Implement `Decode`, `Encode` and `Type` for `Box`, `Arc`, `Cow` and `Rc`
fixes #3100
Implements Decode, Encode and Type for Box<T>, Arc<T>, Cow<'_,T> and Rc<T>. I left out the Decode impl for Rc<T> because of the Send trait bounds in QueryAs and QueryScalar (which makes it impossible to use Rc).
I left out the
Decodeimpl forRc<T>because of theSendtrait bounds inQueryAsandQueryScalar(which makes it impossible to useRc).
@joeydewaal technically it's still possible to use by getting the Row and then calling get(). Someone's gonna end up asking why it doesn't exist, and justifying that would be more work than just carrying the impl.
We can relax the Send bound on QueryAs/QueryScalar in the future when we get rid of BoxStream in the fetch() method: https://github.com/launchbadge/sqlx/blob/277dd36c7868acb10eae20f50418e273b71c8499/sqlx-core/src/query_as.rs#L111
Makes sense, I added the impl for Rc
CI should be fixed if you rebase.
Right, that should be reflected in the latest changes.