pub struct Catalog { /* private fields */ }Expand description
Sorted, filterable view over a set of skill summaries.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn from_summaries(summaries: Vec<SkillSummary>) -> Self
pub fn from_summaries(summaries: Vec<SkillSummary>) -> Self
Build a catalogue from a raw list of summaries. Duplicates (by name) are silently deduplicated — the last occurrence wins, so layered sources can override earlier entries by simply appearing later in the composition order.
Sourcepub fn iter(&self) -> impl Iterator<Item = &SkillSummary>
pub fn iter(&self) -> impl Iterator<Item = &SkillSummary>
Iterate over every skill in catalogue order (category, then name).
Sourcepub fn by_category(
&self,
category: Category,
) -> impl Iterator<Item = &SkillSummary>
pub fn by_category( &self, category: Category, ) -> impl Iterator<Item = &SkillSummary>
Iterate over the skills in a specific category.
Sourcepub fn get(&self, name: &str) -> Option<&SkillSummary>
pub fn get(&self, name: &str) -> Option<&SkillSummary>
Look a skill up by exact name or by the legacy devboy- form.
Both get("setup") and get("devboy-setup") resolve to the
same entry — see canonical_skill_name.
Sourcepub fn counts_per_category(&self) -> BTreeMap<Category, usize>
pub fn counts_per_category(&self) -> BTreeMap<Category, usize>
Return every (category, count) pair for skills in the catalogue.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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