response_time_analysis/arrival/never.rs
1use std::iter;
2
3use super::ArrivalBound;
4use crate::time::Duration;
5
6/// Pathological corner case: model of a task that never releases any jobs.
7#[derive(Copy, Clone, Debug)]
8pub struct Never {}
9
10impl ArrivalBound for Never {
11 fn number_arrivals(&self, _delta: Duration) -> usize {
12 0
13 }
14
15 fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a> {
16 Box::new(iter::empty())
17 }
18
19 fn clone_with_jitter(&self, _jitter: Duration) -> Box<dyn ArrivalBound> {
20 Box::new(Never {})
21 }
22}