I need to have a struct like:
#[derive(Debug, FromRow, ValueList, Serialize)]
struct Task
{
action : i64,
dt : chrono::Duration
}
The problem is that this does not implement ValueList nor Serialize for Serde even though Timestamp is represented as chrono::Duration. However, If i store it as
#[derive(Debug, FromRow, ValueList, Serialize)]
struct Task
{
action : i64,
dt : scylla::frame::value::Timestamp
}
In this scenario, the difficulty is that Timestamp does not implement Serialize from serde.
I would like to avoid having to construct a struct to wrap the scylla::frame::value::Timestamp which wraps the chrono::Duration, but that seems to be the requirement and I would like to avoid that if possible. Especially because this would require me to implement also FromRow and Value list for my wrapper on a wrapper on a wrapper on a i64.