#[non_exhaustive]pub struct LabelSpec {
pub canonical: String,
pub aliases: Vec<String>,
}Expand description
A canonical label plus the surface forms that resolve to it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.canonical: StringMatched case-insensitively as a whole token; this exact string is what
extract_label hands back when the spec wins.
aliases: Vec<String>Additional surface forms (besides canonical) that resolve here, e.g.
canonical "AIAct" with aliases ["AI Act", "ai-act", "EU AI Act"].
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LabelSpec
impl RefUnwindSafe for LabelSpec
impl Send for LabelSpec
impl Sync for LabelSpec
impl Unpin for LabelSpec
impl UnsafeUnpin for LabelSpec
impl UnwindSafe for LabelSpec
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