#[non_exhaustive]pub enum RuleKind {
Window(WindowSpec),
Blackout(BlackoutSpec),
Clearance(Clearance),
LeadTime(LeadTime),
StatusPolicy(StatusPolicy),
Rest(Rest),
Cap(Cap),
}Expand description
The kinds of rule the engine evaluates. Each kind has one fixed meaning, which is what makes rules validatable, combinable and explainable.
The enum is #[non_exhaustive]: 0.2+ may add kinds without a breaking Rust
bump, so a match outside this crate needs a _ arm. Every kind listed here
keeps its meaning.
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.
Window(WindowSpec)
When bookings may happen.
Blackout(BlackoutSpec)
When bookings may not happen.
Clearance(Clearance)
The gaps the new booking needs between meetings.
LeadTime(LeadTime)
How soon and how far ahead a booking may start.
StatusPolicy(StatusPolicy)
How statuses and tags affect availability.
Rest(Rest)
A late finish blocks an early start.
Cap(Cap)
A limit on how much of a period may be booked.
Implementations§
Trait Implementations§
impl Eq for RuleKind
impl StructuralPartialEq for RuleKind
Auto Trait Implementations§
impl Forget for RuleKind
impl Freeze for RuleKind
impl Move for RuleKind
impl RefUnwindSafe for RuleKind
impl Send for RuleKind
impl Sync for RuleKind
impl Unpin for RuleKind
impl UnsafeUnpin for RuleKind
impl UnwindSafe for RuleKind
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