pub struct OrganizationStructure {
pub company_code: String,
pub departments: Vec<Department>,
/* private fields */
}Expand description
Organization structure containing all departments.
Fields§
§company_code: StringCompany code this structure belongs to
departments: Vec<Department>All departments in the organization
Implementations§
Source§impl OrganizationStructure
impl OrganizationStructure
Sourcepub fn add_department(&mut self, department: Department)
pub fn add_department(&mut self, department: Department)
Add a department to the structure.
Sourcepub fn get_department(&self, code: &str) -> Option<&Department>
pub fn get_department(&self, code: &str) -> Option<&Department>
Get a department by code.
Sourcepub fn get_departments_for_process(
&self,
process: BusinessProcess,
) -> Vec<&Department>
pub fn get_departments_for_process( &self, process: BusinessProcess, ) -> Vec<&Department>
Get departments that handle a specific business process.
Sourcepub fn get_departments_for_persona(
&self,
persona: UserPersona,
) -> Vec<&Department>
pub fn get_departments_for_persona( &self, persona: UserPersona, ) -> Vec<&Department>
Get departments with a specific persona type.
Sourcepub fn rebuild_index(&mut self)
pub fn rebuild_index(&mut self)
Rebuild the index (call after deserialization).
Sourcepub fn total_headcount(&self) -> usize
pub fn total_headcount(&self) -> usize
Get total headcount across all departments.
Trait Implementations§
Source§impl Clone for OrganizationStructure
impl Clone for OrganizationStructure
Source§fn clone(&self) -> OrganizationStructure
fn clone(&self) -> OrganizationStructure
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 OrganizationStructure
impl Debug for OrganizationStructure
Source§impl<'de> Deserialize<'de> for OrganizationStructure
impl<'de> Deserialize<'de> for OrganizationStructure
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 OrganizationStructure
impl RefUnwindSafe for OrganizationStructure
impl Send for OrganizationStructure
impl Sync for OrganizationStructure
impl Unpin for OrganizationStructure
impl UnwindSafe for OrganizationStructure
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