Synphonyte / leptos-struct-table

Easily create Leptos table components from structs
Apache License 2.0
164 stars 24 forks source link

the trait bound `Row: ledes_csv::_::_serde::Serialize` is not satisfied #15

Closed syngrato closed 11 months ago

syngrato commented 11 months ago

I have checked for imcompatble versions of serde but don't see any.

I am using serde_valid intensively on the same struct I am trying to build a table from, I don't know if this might be the cause of the issue?

error[E0277]: the trait bound `Row: ledes_csv::_::_serde::Serialize` is not satisfied
   --> frontend/src/ledes_csv.rs:157:10
    |
157 | #[derive(TableComponent, serde::Serialize, serde::Deserialize, Debug, Clone, Default, PartialEq, Validate)]
    |          ^^^^^^^^^^^^^^ the trait `ledes_csv::_::_serde::Serialize` is not implemented for `Row`
    |
    = note: required for `(usize, Row)` to implement `ledes_csv::_::_serde::Serialize`
    = note: 1 redundant requirement hidden
    = note: required for `Vec<(usize, Row)>` to implement `ledes_csv::_::_serde::Serialize`
    = note: required for `Vec<(usize, Row)>` to implement `Serializable`
maccesch commented 11 months ago

can you provide more of the code that causes this?

syngrato commented 11 months ago

Sorry I moved on from this and implemented my own table and I don't seem to have a a check-in of the code. I later realised that this might be due to the struct being defined in its own module and the fields being private. Could this be the cause?

maccesch commented 11 months ago

Could be, yes. Also maybe some other Serialize was derived than the real serde one? I don't know. Sorry it didn't work out