pub struct WbsElement {
pub wbs_id: String,
pub project_id: String,
pub description: String,
pub level: u8,
pub parent_wbs: Option<String>,
pub budget: Decimal,
pub actual_costs: Decimal,
pub is_active: bool,
pub responsible_cost_center: Option<String>,
}Expand description
WBS (Work Breakdown Structure) element.
Fields§
§wbs_id: StringWBS element ID (e.g., “P-001.01.001”)
project_id: StringParent project ID
description: StringDescription
level: u8Level in the hierarchy (1 = top level)
parent_wbs: Option<String>Parent WBS element ID (None for top-level)
budget: DecimalBudget amount
actual_costs: DecimalActual costs to date
is_active: boolIs this element active for postings
responsible_cost_center: Option<String>Responsible cost center
Implementations§
Source§impl WbsElement
impl WbsElement
Sourcepub fn new(wbs_id: &str, project_id: &str, description: &str) -> Self
pub fn new(wbs_id: &str, project_id: &str, description: &str) -> Self
Create a new WBS element.
Sourcepub fn with_parent(self, parent_wbs: &str, level: u8) -> Self
pub fn with_parent(self, parent_wbs: &str, level: u8) -> Self
Set the level and parent.
Sourcepub fn with_budget(self, budget: Decimal) -> Self
pub fn with_budget(self, budget: Decimal) -> Self
Set the budget.
Sourcepub fn remaining_budget(&self) -> Decimal
pub fn remaining_budget(&self) -> Decimal
Calculate remaining budget.
Sourcepub fn is_over_budget(&self) -> bool
pub fn is_over_budget(&self) -> bool
Check if over budget.
Trait Implementations§
Source§impl Clone for WbsElement
impl Clone for WbsElement
Source§fn clone(&self) -> WbsElement
fn clone(&self) -> WbsElement
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 WbsElement
impl Debug for WbsElement
Source§impl<'de> Deserialize<'de> for WbsElement
impl<'de> Deserialize<'de> for WbsElement
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 WbsElement
impl RefUnwindSafe for WbsElement
impl Send for WbsElement
impl Sync for WbsElement
impl Unpin for WbsElement
impl UnwindSafe for WbsElement
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