Struct cld2::Hints
[−]
[src]
pub struct Hints<'a> {
pub content_language: Option<&'a str>,
pub tld: Option<&'a str>,
pub encoding: Option<Encoding>,
pub language: Option<Lang>,
}Hints to the decoder, which it will use to make better guesses.
use std::default::Default; use cld2::Hints; // Specify just one hint. let hints = Hints{content_language: Some("en"), .. Default::default()}; assert_eq!(Some("en"), hints.content_language); assert_eq!(None, hints.tld);
Fields
content_language | A value from an HTTP Content-Language header. The value "fr,en" will bias the decoder towards French and English. |
tld | The top-level domain associated with this text. The value "fr" will bias the decoder towards French. |
encoding | EXPERIMENTAL: The original encoding of the text, before it was
converted to UTF-8. See |
language | An extra language hint. |