pddl/types/
length_spec.rs1#[derive(Debug, Default, Clone, Eq, PartialEq)]
8pub struct LengthSpec {
9 serial: Option<u64>,
10 parallel: Option<u64>,
11}
12
13impl LengthSpec {
14 pub const fn new(serial: Option<u64>, parallel: Option<u64>) -> Self {
15 Self { serial, parallel }
16 }
17
18 pub const fn new_serial(serial: u64) -> Self {
19 Self::new(Some(serial), None)
20 }
21
22 pub const fn new_parallel(parallel: u64) -> Self {
23 Self::new(None, Some(parallel))
24 }
25
26 pub const fn serial(&self) -> Option<u64> {
28 self.serial
29 }
30
31 pub const fn parallel(&self) -> Option<u64> {
33 self.parallel
34 }
35}