afaics, enums consisting of a single type are not yet automatically supported. I can implement ToSql, but it would be nice to not need to. I see there is a #[butane_type(Text)], but it doesnt appear to help here. I have serde Serialize and Deserialize for the enum, and ToString/FromStr, but I get the error below.
error[E0277]: the trait bound `FormatEnum: ToSql` is not satisfied
--> rust/models/src/lib.rs:388:5
|
388 | #[model]
| ^^^^^^^^ the trait `ToSql` is not implemented for `FormatEnum`
|
= help: the following other types implement trait `ToSql`:
...
and 32 others
= note: required for `std::option::Option<FormatEnum>` to implement `ToSql`
= note: required for `SqlVal` to implement `From<std::option::Option<FormatEnum>>`
= note: required for `std::option::Option<FormatEnum>` to implement `Into<SqlVal>`
afaics, enums consisting of a single type are not yet automatically supported. I can implement
ToSql
, but it would be nice to not need to. I see there is a#[butane_type(Text)]
, but it doesnt appear to help here. I have serdeSerialize
andDeserialize
for the enum, andToString
/FromStr
, but I get the error below.error:
enums are mentioned at https://github.com/Electron100/butane/blob/master/notes.org#roadmap