pub struct TagRegistry { /* private fields */ }Expand description
A registry of tag categories for organizing the tag namespace.
Implementations§
Source§impl TagRegistry
impl TagRegistry
Sourcepub fn register_category(&mut self, category: TagCategory)
pub fn register_category(&mut self, category: TagCategory)
Registers a tag category.
Sourcepub fn get_category(&self, name: &str) -> Option<&TagCategory>
pub fn get_category(&self, name: &str) -> Option<&TagCategory>
Gets a category by name.
Sourcepub fn find_category_for_tag(&self, tag: &str) -> Option<&str>
pub fn find_category_for_tag(&self, tag: &str) -> Option<&str>
Finds which category a tag belongs to.
Trait Implementations§
Source§impl Clone for TagRegistry
impl Clone for TagRegistry
Source§fn clone(&self) -> TagRegistry
fn clone(&self) -> TagRegistry
Returns a duplicate of the value. Read more
1.0.0 · 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 TagRegistry
impl Debug for TagRegistry
Source§impl Default for TagRegistry
impl Default for TagRegistry
Source§fn default() -> TagRegistry
fn default() -> TagRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TagRegistry
impl<'de> Deserialize<'de> for TagRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TagRegistry
impl RefUnwindSafe for TagRegistry
impl Send for TagRegistry
impl Sync for TagRegistry
impl Unpin for TagRegistry
impl UnwindSafe for TagRegistry
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