mcai_models 0.9.1

Models for Media Cloud AI project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;

#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct JobProgression {
  pub datetime: DateTime<Utc>,
  pub progression: u8,
}

impl PartialOrd for JobProgression {
  fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
    Some(self.progression.cmp(&other.progression))
  }
}