pub trait KnownTags {
// Required methods
fn assigned_name_for_tag(&self, tag: &Tag) -> Option<String>;
fn name_for_tag(&self, tag: &Tag) -> String;
// Provided method
fn name_for_tag_opt<T>(tag: &Tag, known_tags: Option<&T>) -> String
where T: KnownTags,
Self: Sized { ... }
}Expand description
A type that can return the name for a tag.