pub struct ChangeOrder {
pub id: String,
pub project_id: String,
pub number: u32,
pub submitted_date: NaiveDate,
pub approved_date: Option<NaiveDate>,
pub status: ChangeOrderStatus,
pub reason: ChangeReason,
pub description: String,
pub cost_impact: Decimal,
pub estimated_cost_impact: Decimal,
pub schedule_impact_days: i32,
}Expand description
A change order that modifies a project’s scope, cost, or schedule.
Fields§
§id: StringUnique change order ID
project_id: StringProject ID
number: u32Change order number (sequential within project)
submitted_date: NaiveDateDate submitted
approved_date: Option<NaiveDate>Date approved (if approved)
status: ChangeOrderStatusStatus
reason: ChangeReasonReason for the change
description: StringDescription of the change
cost_impact: DecimalImpact on contract value (positive = increase, negative = decrease)
estimated_cost_impact: DecimalImpact on estimated total cost
schedule_impact_days: i32Schedule impact in calendar days (positive = delay)
Implementations§
Source§impl ChangeOrder
impl ChangeOrder
Sourcepub fn new(
id: impl Into<String>,
project_id: impl Into<String>,
number: u32,
submitted_date: NaiveDate,
reason: ChangeReason,
description: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, project_id: impl Into<String>, number: u32, submitted_date: NaiveDate, reason: ChangeReason, description: impl Into<String>, ) -> Self
Creates a new change order.
Sourcepub fn with_cost_impact(
self,
contract_impact: Decimal,
estimated_impact: Decimal,
) -> Self
pub fn with_cost_impact( self, contract_impact: Decimal, estimated_impact: Decimal, ) -> Self
Sets the cost impact.
Sourcepub fn with_schedule_impact(self, days: i32) -> Self
pub fn with_schedule_impact(self, days: i32) -> Self
Sets the schedule impact.
Sourcepub fn is_approved(&self) -> bool
pub fn is_approved(&self) -> bool
Returns true if the change order is approved.
Sourcepub fn net_cost_impact(&self) -> Decimal
pub fn net_cost_impact(&self) -> Decimal
Returns the net cost impact (only if approved).
Trait Implementations§
Source§impl Clone for ChangeOrder
impl Clone for ChangeOrder
Source§fn clone(&self) -> ChangeOrder
fn clone(&self) -> ChangeOrder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangeOrder
impl Debug for ChangeOrder
Source§impl<'de> Deserialize<'de> for ChangeOrder
impl<'de> Deserialize<'de> for ChangeOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChangeOrder
impl RefUnwindSafe for ChangeOrder
impl Send for ChangeOrder
impl Sync for ChangeOrder
impl Unpin for ChangeOrder
impl UnsafeUnpin for ChangeOrder
impl UnwindSafe for ChangeOrder
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