dxps / fullstack-rust-axum-dioxus-rwa

A RealWorld app implementation as a fullstack Rust project using Axum (back-end) and Dioxus (front-end).
MIT License
80 stars 6 forks source link

`sqlx::FromFrow` as implementation vs attribute #7

Closed dxps closed 1 year ago

dxps commented 1 year ago

Currently, src/repos/users_repo.rs file contains explicit implementations (impl FromRow ... for ...) for User, UserId and UserEntry.

Initial reasoning was to try to keep the domain model as clean as possible. However, just adding the sqlx::FromRow into the existing #[derive(...) attribute shouldn't hurt, but eliminate those implementations: image

dxps commented 1 year ago

For now, I'd rather keep it like that.