Struct ddg::query::Query [] [src]

pub struct Query<'a> { /* fields omitted */ }

A Builder struct for making the query.

Methods

impl<'a> Query<'a>
[src]

Constructs a new query object, requiring the query, and the name of your app. It is recommended to use a constant for the name of your app.

use ddg::Query;
const APP_NAME: &'static str = "ddg_example_app";
let query = Query::new("Rust", APP_NAME);

let response = query.execute().unwrap();

Will strip out any HTML content from the text in the Response eg.(italics, bolds, etc)

use ddg::Query;
const APP_NAME: &'static str = "ddg_example_app";

let query = Query::new("Rust", APP_NAME).no_html();

let response = query.execute().unwrap();

Skip the D(Disambiguation) type of Instant Answer.

Execute the request and parses it into a DdgResponse struct.

Trait Implementations

impl<'a> Clone for Query<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

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

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

impl<'a> IntoUrl for Query<'a>
[src]

Consumes the object, trying to return a Url.