pub struct FriendRegistry { /* private fields */ }Expand description
Owned registry of Fellow Friends records.
Implementations§
Source§impl FriendRegistry
impl FriendRegistry
Sourcepub fn new<I>(friends: I) -> FriendRegistry
pub fn new<I>(friends: I) -> FriendRegistry
Builds a registry from owned friends or borrowed fixture records.
Sourcepub fn from_static(friends: &'static [Friend]) -> FriendRegistry
pub fn from_static(friends: &'static [Friend]) -> FriendRegistry
Builds a registry from a static fixture slice.
Sourcepub fn all() -> FriendRegistry
pub fn all() -> FriendRegistry
Builds a registry containing every bundled fixture record.
Sourcepub fn by_ecosystem(&self, ecosystem: &str) -> Vec<&Friend>
pub fn by_ecosystem(&self, ecosystem: &str) -> Vec<&Friend>
Returns friends matching an ecosystem name.
Sourcepub fn by_technology_kind(&self, kind: TechnologyKind) -> Vec<&Friend>
pub fn by_technology_kind(&self, kind: TechnologyKind) -> Vec<&Friend>
Returns friends with the requested technology kind.
Sourcepub fn by_identity_kind(&self, kind: IdentityKind) -> Vec<&Friend>
pub fn by_identity_kind(&self, kind: IdentityKind) -> Vec<&Friend>
Returns friends with the requested identity kind.
Sourcepub fn by_figure_kind(&self, kind: FigureKind) -> Vec<&Friend>
pub fn by_figure_kind(&self, kind: FigureKind) -> Vec<&Friend>
Returns friends with the requested figure kind.
Sourcepub fn find_by_id(&self, id: &str) -> Option<&Friend>
pub fn find_by_id(&self, id: &str) -> Option<&Friend>
Finds one friend by stable identifier.
Sourcepub fn count_by_technology_kind(&self) -> BTreeMap<TechnologyKind, usize>
pub fn count_by_technology_kind(&self) -> BTreeMap<TechnologyKind, usize>
Counts friends by technology kind in deterministic key order.
Sourcepub fn count_by_identity_kind(&self) -> BTreeMap<IdentityKind, usize>
pub fn count_by_identity_kind(&self) -> BTreeMap<IdentityKind, usize>
Counts friends by identity kind in deterministic key order.
Trait Implementations§
Source§impl Clone for FriendRegistry
impl Clone for FriendRegistry
Source§fn clone(&self) -> FriendRegistry
fn clone(&self) -> FriendRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FriendRegistry
impl Debug for FriendRegistry
Source§impl Default for FriendRegistry
impl Default for FriendRegistry
Source§fn default() -> FriendRegistry
fn default() -> FriendRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FriendRegistry
impl RefUnwindSafe for FriendRegistry
impl Send for FriendRegistry
impl Sync for FriendRegistry
impl Unpin for FriendRegistry
impl UnsafeUnpin for FriendRegistry
impl UnwindSafe for FriendRegistry
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