pub struct DetectedLanguage {
pub code: String,
pub confidence: f32,
pub reliable: bool,
}Expand description
A language detected for a chunk or aggregated over a document.
code is the ISO 639-3 code (e.g. "eng", "spa", "cmn"). The
underlying detector (whatlang) is an internal implementation detail and is
not part of this public API.
Fields§
§code: StringISO 639-3 language code.
confidence: f32Detector confidence in [0.0, 1.0].
reliable: boolWhether the detector considers this detection reliable.
Trait Implementations§
Source§impl Clone for DetectedLanguage
impl Clone for DetectedLanguage
Source§fn clone(&self) -> DetectedLanguage
fn clone(&self) -> DetectedLanguage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DetectedLanguage
impl Debug for DetectedLanguage
Source§impl PartialEq for DetectedLanguage
impl PartialEq for DetectedLanguage
impl StructuralPartialEq for DetectedLanguage
Auto Trait Implementations§
impl Freeze for DetectedLanguage
impl RefUnwindSafe for DetectedLanguage
impl Send for DetectedLanguage
impl Sync for DetectedLanguage
impl Unpin for DetectedLanguage
impl UnsafeUnpin for DetectedLanguage
impl UnwindSafe for DetectedLanguage
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