pub struct BaselineRequest {
pub plan_id: PlanId,
pub start: Option<DateTime<Utc>>,
pub calendar: Option<Calendar>,
pub reason: Option<String>,
pub backfill_from: Option<DateTime<Utc>>,
}Expand description
Take a baseline of a plan (plan.baseline).
Fields§
§plan_id: PlanId§start: Option<DateTime<Utc>>Baseline start; defaults to the planner clock’s now.
calendar: Option<Calendar>Working-time calendar; None counts wall-clock hours.
reason: Option<String>Why the plan is re-baselined. Required (non-blank) when the plan
already has a baseline; at most MAX_BASELINE_REASON_CHARS.
backfill_from: Option<DateTime<Utc>>Retroactive baseline start: the baseline’s start is this instant
instead of now and the baseline is marked backfilled. Must not be
in the future or before the plan’s creation time.
Implementations§
Source§impl BaselineRequest
impl BaselineRequest
pub fn new(plan_id: PlanId) -> Self
pub fn with_start(self, start: DateTime<Utc>) -> Self
pub fn with_backfill_from(self, backfill_from: DateTime<Utc>) -> Self
pub fn with_calendar(self, calendar: Calendar) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for BaselineRequest
impl Clone for BaselineRequest
Source§impl Debug for BaselineRequest
impl Debug for BaselineRequest
Source§impl PartialEq for BaselineRequest
impl PartialEq for BaselineRequest
impl StructuralPartialEq for BaselineRequest
Auto Trait Implementations§
impl Freeze for BaselineRequest
impl RefUnwindSafe for BaselineRequest
impl Send for BaselineRequest
impl Sync for BaselineRequest
impl Unpin for BaselineRequest
impl UnsafeUnpin for BaselineRequest
impl UnwindSafe for BaselineRequest
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