-
Since type is a reserved keyword in rust how do I create a field name called "type" to match the table's type column? I tried using serde rename, just a stab in the dark, and of course that did not work. |
Beta Was this translation helpful? Give feedback.
Answered by
mehcode
Apr 30, 2024
Replies: 1 comment
-
Use the struct Foo {
r#type: String;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mehcode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the
r#
prefix in Rust. So, in a struct..