aboutsummaryrefslogtreecommitdiff
path: root/src/occurence.rs
blob: 104438a468847fdb79652a96b650bfc2f339b0c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub enum Condition {
    And(Vec<Condition>),
    Or(Vec<Condition>),
    From(Box<Condition>),
    To(Box<Condition>),

    Year(Range),
    Monthofyear(Range),
    Weekofmonth(Range),
    Dayofyear(Range),
    Dayofmonth(Range),
    Dayofweek(Range),

    Hour(Range),
    Minute(Range),
    Second(Range),

    Unix(Range),
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Range(u64, u64);