implements the get_tasks

This commit is contained in:
Tamo 2022-09-22 20:02:55 +02:00 committed by Clément Renault
parent 5b282acb7b
commit f84cbee170
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
7 changed files with 131 additions and 22 deletions

View file

@ -18,16 +18,27 @@ pub struct TaskView {
#[serde(rename = "type")]
pub kind: Kind,
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<Details>,
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<ResponseError>,
#[serde(serialize_with = "serialize_duration")]
#[serde(
serialize_with = "serialize_duration",
skip_serializing_if = "Option::is_none"
)]
pub duration: Option<Duration>,
#[serde(with = "time::serde::rfc3339")]
pub enqueued_at: OffsetDateTime,
#[serde(with = "time::serde::rfc3339::option")]
#[serde(
with = "time::serde::rfc3339::option",
skip_serializing_if = "Option::is_none"
)]
pub started_at: Option<OffsetDateTime>,
#[serde(with = "time::serde::rfc3339::option")]
#[serde(
with = "time::serde::rfc3339::option",
skip_serializing_if = "Option::is_none"
)]
pub finished_at: Option<OffsetDateTime>,
}