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: Option<&'a str>
A value from an HTTP Content-Language header. The value "fr,en" will bias the decoder towards French and English.
tld: Option<&'a str>
The top-level domain associated with this text. The value "fr" will bias the decoder towards French.
encoding: Option<Encoding>
EXPERIMENTAL: The original encoding of the text, before it was
converted to UTF-8. See Encoding
for legal values.
language: Option<Lang>
An extra language hint.