pub struct ResourceProfile {
pub id: ProfileId,
pub name: String,
pub description: Option<String>,
pub specializes: Option<ProfileId>,
pub skills: Vec<String>,
pub traits: Vec<TraitId>,
pub rate: Option<ResourceRate>,
pub calendar: Option<CalendarId>,
pub efficiency: Option<f32>,
}Expand description
Abstract resource profile for planning (RFC-0001)
Represents a role or capability, not a specific person. Used during early estimation when staffing is not finalized.
§Example
use utf8proj_core::{ResourceProfile, RateRange};
use rust_decimal::Decimal;
let backend_dev = ResourceProfile::new("backend_dev")
.name("Backend Developer")
.description("Server-side development")
.specializes("developer")
.skill("java")
.skill("sql")
.rate_range(RateRange::new(Decimal::from(550), Decimal::from(800)));Fields§
§id: ProfileIdUnique identifier
name: StringHuman-readable name
description: Option<String>Optional description
specializes: Option<ProfileId>Parent profile (constraint refinement, not OO inheritance)
skills: Vec<String>Required skills
traits: Vec<TraitId>Applied traits (rate modifiers)
rate: Option<ResourceRate>Rate (can be range or fixed)
calendar: Option<CalendarId>Custom calendar
efficiency: Option<f32>Efficiency factor
Implementations§
Source§impl ResourceProfile
impl ResourceProfile
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set the description
Sourcepub fn specializes(self, parent: impl Into<String>) -> Self
pub fn specializes(self, parent: impl Into<String>) -> Self
Set the parent profile (specialization)
Sourcepub fn skills(self, skills: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn skills(self, skills: impl IntoIterator<Item = impl Into<String>>) -> Self
Add multiple skills
Sourcepub fn with_trait(self, trait_id: impl Into<String>) -> Self
pub fn with_trait(self, trait_id: impl Into<String>) -> Self
Add a trait
Sourcepub fn with_traits(
self,
traits: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_traits( self, traits: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple traits
Sourcepub fn rate_range(self, range: RateRange) -> Self
pub fn rate_range(self, range: RateRange) -> Self
Set a rate range
Sourcepub fn efficiency(self, efficiency: f32) -> Self
pub fn efficiency(self, efficiency: f32) -> Self
Set the efficiency factor
Sourcepub fn is_abstract(&self) -> bool
pub fn is_abstract(&self) -> bool
Check if this profile is abstract (has no fixed rate or is a range)
Trait Implementations§
Source§impl Clone for ResourceProfile
impl Clone for ResourceProfile
Source§fn clone(&self) -> ResourceProfile
fn clone(&self) -> ResourceProfile
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 ResourceProfile
impl Debug for ResourceProfile
Source§impl<'de> Deserialize<'de> for ResourceProfile
impl<'de> Deserialize<'de> for ResourceProfile
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 ResourceProfile
impl RefUnwindSafe for ResourceProfile
impl Send for ResourceProfile
impl Sync for ResourceProfile
impl Unpin for ResourceProfile
impl UnwindSafe for ResourceProfile
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