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);



A value from an HTTP Content-Language header. The value "fr,en" will bias the decoder towards French and English.


The top-level domain associated with this text. The value "fr" will bias the decoder towards French.


EXPERIMENTAL: The original encoding of the text, before it was converted to UTF-8. See Encoding for legal values.


An extra language hint.

Trait Implementations

Derived Implementations

impl<'a> Default for Hints<'a>

fn default() -> Hints<'a>

impl<'a> Debug for Hints<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result