dsync icon indicating copy to clipboard operation
dsync copied to clipboard

[src/{bin/main,global,lib}.rs] Add new `additional_derives` vec CLI opt…

Open SamuelMarks opened this issue 3 months ago • 0 comments

; [src/code.rs] Fix type elision warning

Basically I am getting this issue:

error[E0277]: the trait bound `models::profiles_tbl::generated::CreateProfilesTbl: ToSchema` is not satisfied
  --> src/routes/profile.rs:67:32
   |
67 |     form: actix_web::web::Json<CreateProfilesTbl>,
   |                                ^^^^^^^^^^^^^^^^^ unsatisfied trait bound

utoipa::ToSchema needs to be on the struct. But it's a bit too specific to make it to this library/cli, and regardless doesn't futureproof dsync.

So this just lets you add arbitrary derives as strings. As many as your heart desires.

--help

  -d, --derive <ADDITIONAL_DERIVES>
          Add these additional derives to each generated `struct`

SamuelMarks avatar Sep 05 '25 16:09 SamuelMarks