pub struct SalesRep {
pub id: String,
pub name: String,
pub capacity: i64,
pub current_load: i64,
pub territories: Vec<String>,
pub segments: Vec<String>,
pub skills: Vec<String>,
pub performance_score: f64,
}Expand description
A sales rep
Fields§
§id: StringRep identifier
name: StringRep name
capacity: i64Maximum leads this rep can handle
current_load: i64Current number of active leads
territories: Vec<String>Territories this rep covers
segments: Vec<String>Segments this rep specializes in
skills: Vec<String>Skills/expertise areas
performance_score: f64Performance score (0-100)
Implementations§
Source§impl SalesRep
impl SalesRep
Sourcepub fn available_capacity(&self) -> i64
pub fn available_capacity(&self) -> i64
Get available capacity
Sourcepub fn covers_territory(&self, territory: &str) -> bool
pub fn covers_territory(&self, territory: &str) -> bool
Check if rep covers a territory
Sourcepub fn can_accept_lead(&self) -> bool
pub fn can_accept_lead(&self) -> bool
Check if rep can take on more leads
Sourcepub fn suitability_for_lead(&self, lead: &Lead) -> f64
pub fn suitability_for_lead(&self, lead: &Lead) -> f64
Calculate suitability for a lead (considering capacity)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SalesRep
impl<'de> Deserialize<'de> for SalesRep
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 SalesRep
impl RefUnwindSafe for SalesRep
impl Send for SalesRep
impl Sync for SalesRep
impl Unpin for SalesRep
impl UnsafeUnpin for SalesRep
impl UnwindSafe for SalesRep
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