#[non_exhaustive]pub struct Detection {
pub locale: Locale,
pub confidence: f64,
pub matches: usize,
pub candidates: Vec<(Locale, usize)>,
}Expand description
A language-detection result with ranked evidence.
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.locale: LocaleThe best-matching locale.
confidence: f64Confidence in [0, 1); grows with the number of distinct matches.
matches: usizeDistinct catalog aliases found for the best locale.
candidates: Vec<(Locale, usize)>Every candidate locale with its match count, ranked descending.
Trait Implementations§
impl StructuralPartialEq for Detection
Auto Trait Implementations§
impl Freeze for Detection
impl RefUnwindSafe for Detection
impl Send for Detection
impl Sync for Detection
impl Unpin for Detection
impl UnsafeUnpin for Detection
impl UnwindSafe for Detection
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