pub enum ScoutRank {
Unknown = 0,
Scout = 1,
Tenderfoot = 2,
SecondClass = 3,
FirstClass = 4,
Star = 5,
Life = 6,
Eagle = 7,
}Expand description
Scout rank for sorting purposes
Variants§
Implementations§
Source§impl ScoutRank
impl ScoutRank
Sourcepub fn parse(s: Option<&str>) -> Self
pub fn parse(s: Option<&str>) -> Self
Parse a rank string into a ScoutRank enum value. Handles variations like “Eagle Scout”, “Life Scout”, etc.
Sourcepub fn order(&self) -> usize
pub fn order(&self) -> usize
Get the numeric order for sorting (0 = Unknown/Crossover, 7 = Eagle).
Sourcepub fn all_display_order() -> &'static [ScoutRank]
pub fn all_display_order() -> &'static [ScoutRank]
Returns all ranks in display order (highest to lowest: Eagle → Unknown/Crossover).
Sourcepub fn abbreviation(&self) -> &'static str
pub fn abbreviation(&self) -> &'static str
Get a short abbreviation for this rank.
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Get the display name for this rank.
Trait Implementations§
Source§impl Ord for ScoutRank
impl Ord for ScoutRank
Source§impl PartialOrd for ScoutRank
impl PartialOrd for ScoutRank
impl Copy for ScoutRank
impl Eq for ScoutRank
impl StructuralPartialEq for ScoutRank
Auto Trait Implementations§
impl Freeze for ScoutRank
impl RefUnwindSafe for ScoutRank
impl Send for ScoutRank
impl Sync for ScoutRank
impl Unpin for ScoutRank
impl UnsafeUnpin for ScoutRank
impl UnwindSafe for ScoutRank
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