pub struct BannerPatternRegistry {
banner_patterns_by_id: Vec<BannerPatternRef>,
banner_patterns_by_key: FxHashMap<Identifier, usize>,
tags: FxHashMap<Identifier, Vec<Identifier>>,
allows_registering: bool,
}Fields§
§allows_registering: boolImplementations§
Source§impl BannerPatternRegistry
impl BannerPatternRegistry
pub fn register(&mut self, entry: BannerPatternRef) -> usize
pub fn iter(&self) -> impl Iterator<Item = (usize, BannerPatternRef)> + '_
Trait Implementations§
Source§impl Default for BannerPatternRegistry
impl Default for BannerPatternRegistry
Source§impl RegistryExt for BannerPatternRegistry
impl RegistryExt for BannerPatternRegistry
type Entry = BannerPattern
fn freeze(&mut self)
fn by_id(&self, id: usize) -> Option<&'static BannerPattern>
fn by_key(&self, key: &Identifier) -> Option<&'static BannerPattern>
fn id_from_key(&self, key: &Identifier) -> Option<usize>
fn len(&self) -> usize
fn is_empty(&self) -> bool
Source§impl TaggedRegistryExt for BannerPatternRegistry
impl TaggedRegistryExt for BannerPatternRegistry
fn register_tag(&mut self, tag: Identifier, keys: &[&'static str])
fn modify_tag( &mut self, tag: &Identifier, f: impl FnOnce(Vec<Identifier>) -> Vec<Identifier>, )
fn is_in_tag(&self, entry: &Self::Entry, tag: &Identifier) -> bool
fn get_tag(&self, tag: &Identifier) -> Option<Vec<&'static Self::Entry>>
fn iter_tag( &self, tag: &Identifier, ) -> impl Iterator<Item = &'static Self::Entry> + '_
fn tag_keys(&self) -> impl Iterator<Item = &Identifier> + '_
Auto Trait Implementations§
impl Freeze for BannerPatternRegistry
impl RefUnwindSafe for BannerPatternRegistry
impl Send for BannerPatternRegistry
impl Sync for BannerPatternRegistry
impl Unpin for BannerPatternRegistry
impl UnsafeUnpin for BannerPatternRegistry
impl UnwindSafe for BannerPatternRegistry
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