#[non_exhaustive]pub struct BreakRule {
pub break_requests: Vec<BreakRequest>,
pub frequency_constraints: Vec<FrequencyConstraint>,
/* private fields */
}๐Deprecated
Expand description
Deprecated: Use top level BreakRule instead. Rules to generate time breaks for a vehicle (e.g. lunch breaks). A break is a contiguous period of time during which the vehicle remains idle at its current position and cannot perform any visit. A break may occur:
- during the travel between two visits (which includes the time right before or right after a visit, but not in the middle of a visit), in which case it extends the corresponding transit time between the visits
- before the vehicle start (the vehicle may not start in the middle of a break), in which case it does not affect the vehicle start time.
- after the vehicle end (ditto, with the vehicle end time).
Fields (Non-exhaustive)ยง
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.break_requests: Vec<BreakRequest>๐Deprecated
Sequence of breaks. See the BreakRequest message.
frequency_constraints: Vec<FrequencyConstraint>๐Deprecated
Several FrequencyConstraint may apply. They must all be satisfied by
the BreakRequests of this BreakRule. See FrequencyConstraint.
Implementationsยง
Sourceยงimpl BreakRule
impl BreakRule
pub fn new() -> Self
Sourcepub fn set_break_requests<T, V>(self, v: T) -> Self
pub fn set_break_requests<T, V>(self, v: T) -> Self
Sets the value of break_requests.
Sourcepub fn set_frequency_constraints<T, V>(self, v: T) -> Self
pub fn set_frequency_constraints<T, V>(self, v: T) -> Self
Sets the value of frequency_constraints.
Trait Implementationsยง
impl StructuralPartialEq for BreakRule
Auto Trait Implementationsยง
impl Freeze for BreakRule
impl RefUnwindSafe for BreakRule
impl Send for BreakRule
impl Sync for BreakRule
impl Unpin for BreakRule
impl UnwindSafe for BreakRule
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