[][src]Trait hors::engine::Engine

pub trait Engine {
    pub fn get_query_url(&self, query: &str, use_https: bool) -> String;
pub fn extract_links(&self, pages: &str) -> Option<Vec<String>>; }

Search engine trait

Required methods

pub fn get_query_url(&self, query: &str, use_https: bool) -> String[src]

Get relative url to make search through query information.

Arguments

  • query - The user input query information.
  • use_https - Return query url which is https scheme or http scheme.

Returns

Return the query url, which can be fired with HTTP GET request.

Extract stackoverflow links from given page.

Arguments

  • page - the search result page, which is mainly fetched from http GET method.

Links to the relative question, or returns None if we can't find it.

Loading content...

Implementors

Loading content...