sqlx
sqlx copied to clipboard
Add more JsonRawValue encode/decode impls.
This PR adds a Decode impl for Box<JsonRawValue>. This allows keeping structs that implement FromRow lifetime-free,
previously you had to use &'a JsonRawValue.
struct Foo {
bar: Box<JsonRawValue>,
}
I've also added Encode impls for JsonRawValue. There was a comment stating "We don't have to implement Encode for JsonRawValue because that's covered by the default implementation for Encode" but as far as I can tell that's not true, no default impl would cover JsonRawValue.