cornucopia-rs / cornucopia

Generate type-checked Rust from your PostgreSQL.
Other
759 stars 31 forks source link

🎨 Move type traits into their own module. #152

Closed LouisGariepy closed 1 year ago

LouisGariepy commented 1 year ago

Some minor improvements discussed here https://github.com/cornucopia-rs/cornucopia/pull/141#issuecomment-1241340593 (the first two points only).

I moved the type traits into their own module.

I also made all the trait bounds Send + Sync, as previously JsonSql was Send + Sync, while the rest were Sync only. I think for now its OK to be conservative (i.e. Send + Sync instead of just Sync), and later on when async traits are stabilized we can reevaluate if we can loosen the bounds.