Skip to main content

TaggedRegistryExt

Trait TaggedRegistryExt 

Source
pub trait TaggedRegistryExt: RegistryExt {
    // Required methods
    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: &'static 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> + '_;
}
Expand description

Trait for registries that support tagging entries.

Required Methods§

Source

fn register_tag(&mut self, tag: Identifier, keys: &[&'static str])

Source

fn modify_tag( &mut self, tag: &Identifier, f: impl FnOnce(Vec<Identifier>) -> Vec<Identifier>, )

Source

fn is_in_tag(&self, entry: &'static Self::Entry, tag: &Identifier) -> bool

Source

fn get_tag(&self, tag: &Identifier) -> Option<Vec<&'static Self::Entry>>

Source

fn iter_tag( &self, tag: &Identifier, ) -> impl Iterator<Item = &'static Self::Entry> + '_

Source

fn tag_keys(&self) -> impl Iterator<Item = &Identifier> + '_

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§