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

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

impl<'a> Debug for Hints<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> Default for Hints<'a>
[src]

[src]

Returns the "default value" for a type. Read more