#[non_exhaustive]pub enum ScheduleProblem {
NotSchedulable(ResolveError),
WrongCount {
given: usize,
needed: usize,
},
TooEarly {
sequence: Id,
at: Timestamp,
not_before: Timestamp,
},
Overruns {
sequence: Id,
at: Timestamp,
end_time: Timestamp,
},
PauseTooLong {
sequence: Id,
idle: Duration,
allowed: Duration,
},
}Expand description
Why a concrete set of start times will not do.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotSchedulable(ResolveError)
The choices do not describe the profile at all, so there is nothing to time.
Kept distinct from WrongCount: “you named a sequence that
does not exist” and “you gave me four start times for three sequences” are
different mistakes, and collapsing them reports the second for the first.
WrongCount
One start time per chosen sequence is needed, and a different number was given.
TooEarly
A sequence starts before the profile opens, or before its predecessor finishes.
Fields
Overruns
A sequence would still be running when the profile’s window closes.
Fields
PauseTooLong
The device would idle longer than the sequence allows.
S2J schemas/PPBC.PowerSequence.max_pause_before.
Trait Implementations§
Source§impl Clone for ScheduleProblem
impl Clone for ScheduleProblem
Source§impl Debug for ScheduleProblem
impl Debug for ScheduleProblem
Source§impl Display for ScheduleProblem
impl Display for ScheduleProblem
Source§impl Error for ScheduleProblem
impl Error for ScheduleProblem
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ScheduleProblem
impl PartialEq for ScheduleProblem
impl StructuralPartialEq for ScheduleProblem
Auto Trait Implementations§
impl Forget for ScheduleProblem
impl Freeze for ScheduleProblem
impl RefUnwindSafe for ScheduleProblem
impl Send for ScheduleProblem
impl Sync for ScheduleProblem
impl Unpin for ScheduleProblem
impl UnsafeUnpin for ScheduleProblem
impl UnwindSafe for ScheduleProblem
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
Mutably borrows from an owned value. Read more