pub enum Reference<'a> {
Bare(&'a str),
Coded {
system: &'a str,
code: &'a str,
},
}Expand description
How a configuration names a category: a bare priority code, or
<system>|<code>.
Variants§
Implementations§
Source§impl<'a> Reference<'a>
impl<'a> Reference<'a>
Sourcepub fn read(text: &'a str) -> Self
pub fn read(text: &'a str) -> Self
Reads text: <system>|<code> when it holds a |, a bare code
otherwise.
Sourcepub fn priority(self) -> Option<Category>
pub fn priority(self) -> Option<Category>
The priority category this names, or None when it names another.
Sourcepub fn names(self, national: &NationalCategory) -> bool
pub fn names(self, national: &NationalCategory) -> bool
Whether this names national.
Trait Implementations§
impl<'a> Copy for Reference<'a>
impl<'a> Eq for Reference<'a>
impl<'a> StructuralPartialEq for Reference<'a>
Auto Trait Implementations§
impl<'a> Freeze for Reference<'a>
impl<'a> RefUnwindSafe for Reference<'a>
impl<'a> Send for Reference<'a>
impl<'a> Sync for Reference<'a>
impl<'a> Unpin for Reference<'a>
impl<'a> UnsafeUnpin for Reference<'a>
impl<'a> UnwindSafe for Reference<'a>
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