#[non_exhaustive]pub struct DetectedLanguage {
pub language_code: String,
pub confidence: f32,
/* private fields */
}Expand description
Detected language for a structural component.
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.language_code: StringThe BCP-47 language
code,
such as en-US or sr-Latn.
confidence: f32Confidence of detected language. Range [0, 1].
Implementations§
Source§impl DetectedLanguage
impl DetectedLanguage
pub fn new() -> Self
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
Sourcepub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
pub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
Sets the value of confidence.
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 · 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 Default for DetectedLanguage
impl Default for DetectedLanguage
Source§fn default() -> DetectedLanguage
fn default() -> DetectedLanguage
Returns the “default value” for a type. Read more
Source§impl Message for DetectedLanguage
impl Message 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 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