pub struct Schedule {
pub hyper_period: Option<Duration>,
pub deadlines: Vec<Deadline>,
}
Expand description
A schedule for the periodic streams.
The schedule is a sequence of deadlines and describes a single hyper-period. Hence, the sequences is meant to repeat afterwards.
Fields§
§hyper_period: Option<Duration>
The hyper_period
is the duration after which the schedule is meant to repeat.
It is therefore the least common multiple of all periods. If there are no statically scheduled streams, the hyper-period is None
.
§Example:
If there are three streams, one running at 0.5Hz, one with 1Hz, and one with 2Hz. The hyper-period then is 2000ms.
deadlines: Vec<Deadline>
A sequence of deadlines within a hyper-period.
Deadlines represent points in time at which periodic stream needs to be updated. Deadlines may not be empty. The first deadline is due Deadline::pause time units after the start of the schedule. Subsequent deadlines are due Deadline::pause time units after their predecessor.
§Example:
Assume there are two periodic streams, a
running at 1Hz and b
running at 2Hz. The deadlines are thus {b
} at time 500ms and {a
, b
}
500ms later. Then, the schedule repeats.
§See Also
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnwindSafe for Schedule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more