- Notifications
You must be signed in to change notification settings - Fork515
Open
Description
I am writing a small webserver in rust and I ran into issues with circular references. The JSON object that I receive from my UI has a circular structure like this:
#[derive(Serialize, Deserialize, Debug, FromSql, ToSql)]struct StructA { id: u32, data: StructB}#[derive(Serialize, Deserialize, Debug, FromSql, ToSql)]struct StructB { id: u32, data: Box<StructA>}
My issue is that I need to add boilerplate code to implement the Sql traits from Box, which just forwards the request to StructA's implementation.
Would it make sense to add this generic implementation in the library?
Metadata
Metadata
Assignees
Labels
No labels