mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-05-29 08:58:02 +02:00
05c8d81e65
Chrono has been unmaintened for a few month now and there is a CVE on it. make clippy happy bump milli
23 lines
351 B
Rust
23 lines
351 B
Rust
use time::OffsetDateTime;
|
|
|
|
use super::task::Task;
|
|
|
|
pub type BatchId = u64;
|
|
|
|
#[derive(Debug)]
|
|
pub struct Batch {
|
|
pub id: BatchId,
|
|
pub created_at: OffsetDateTime,
|
|
pub tasks: Vec<Task>,
|
|
}
|
|
|
|
impl Batch {
|
|
pub fn len(&self) -> usize {
|
|
self.tasks.len()
|
|
}
|
|
|
|
pub fn is_empty(&self) -> bool {
|
|
self.tasks.is_empty()
|
|
}
|
|
}
|