pub struct LeadershipPosition {
pub position: Option<String>,
pub start_date: Option<String>,
pub end_date: Option<String>,
pub days_served: Option<i32>,
pub patrol: Option<String>,
pub rank: Option<String>,
}Fields§
§position: Option<String>§start_date: Option<String>§end_date: Option<String>§days_served: Option<i32>§patrol: Option<String>§rank: Option<String>Implementations§
Source§impl LeadershipPosition
impl LeadershipPosition
Sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
Returns true if this is a current position (no end date or end date in future)
Sourcepub fn date_range(&self) -> String
pub fn date_range(&self) -> String
Format the date range for display
Sourcepub fn sort_for_display(positions: &mut [LeadershipPosition])
pub fn sort_for_display(positions: &mut [LeadershipPosition])
Sort positions for display: current first, then by start_date desc.
Sourcepub fn days_display(&self) -> String
pub fn days_display(&self) -> String
Format days served for display
Trait Implementations§
Source§impl Clone for LeadershipPosition
impl Clone for LeadershipPosition
Source§fn clone(&self) -> LeadershipPosition
fn clone(&self) -> LeadershipPosition
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 LeadershipPosition
impl Debug for LeadershipPosition
Source§impl<'de> Deserialize<'de> for LeadershipPosition
impl<'de> Deserialize<'de> for LeadershipPosition
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 LeadershipPosition
impl RefUnwindSafe for LeadershipPosition
impl Send for LeadershipPosition
impl Sync for LeadershipPosition
impl Unpin for LeadershipPosition
impl UnsafeUnpin for LeadershipPosition
impl UnwindSafe for LeadershipPosition
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