Crate bing_dict[][src]

Expand description

bing-dict

Use Bing Dictionary to translate words and phrases from Chinese to English or English to Chinese.

Examples

#[tokio::main]
async fn main() {
    let result = bing_dict::translate("dictionary").await.unwrap().unwrap();
    println!("{:?}", result);
    println!("{}", result.to_string());
}

Structs

The paraphrase of a word / phrase. You can read its fields manually or just call .to_string() to get the paraphrase as a string.

Enums

The Errors that may occur

Functions

Translate a word / phrase using Bing Dictionary. Return Ok(None) if the word can not be found.