pub struct CseListCall<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

Returns metadata about the search performed, metadata about the engine used for the search, and the search results.

A builder for the list method supported by a cse resource. It is not used directly, but through a CseMethods instance.

§Example

Instantiate a resource method builder

 
// You can configure optional parameters by calling the respective setters at will, and
// execute the final call using `doit()`.
// Values shown here are possibly random and not representative !
let result = hub.cse().list()
             .start(24)
             .sort("sadipscing")
             .site_search_filter("aliquyam")
             .site_search("dolores")
             .search_type("sadipscing")
             .safe("erat")
             .rights("aliquyam")
             .related_site("amet")
             .q("est")
             .or_terms("et")
             .num(-10)
             .lr("consetetur")
             .low_range("consetetur")
             .link_site("Stet")
             .img_type("est")
             .img_size("aliquyam")
             .img_dominant_color("elitr")
             .img_color_type("duo")
             .hq("diam")
             .hl("est")
             .high_range("sit")
             .googlehost("sed")
             .gl("eos")
             .filter("Lorem")
             .file_type("ea")
             .exclude_terms("Stet")
             .exact_terms("dolores")
             .date_restrict("eos")
             .cx("et")
             .cr("sea")
             .c2coff("et")
             .doit().await;

Implementations§

source§

impl<'a, S> CseListCall<'a, S>
where S: Service<Uri> + Clone + Send + Sync + 'static, S::Response: Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, S::Future: Send + Unpin + 'static, S::Error: Into<Box<dyn StdError + Send + Sync>>,

source

pub async fn doit(self) -> Result<(Response<Body>, Search)>

Perform the operation you have build so far.

source

pub fn start(self, new_value: u32) -> CseListCall<'a, S>

The index of the first result to return. The default number of results per page is 10, so &start=11 would start at the top of the second page of results. Note: The JSON API will never return more than 100 results, even if more than 100 documents match the query, so setting the sum of start + num to a number greater than 100 will produce an error. Also note that the maximum value for num is 10.

Sets the start query property to the given value.

source

pub fn sort(self, new_value: &str) -> CseListCall<'a, S>

The sort expression to apply to the results. The sort parameter specifies that the results be sorted according to the specified expression i.e. sort by date. Example: sort=date.

Sets the sort query property to the given value.

source

pub fn site_search_filter(self, new_value: &str) -> CseListCall<'a, S>

Controls whether to include or exclude results from the site named in the siteSearch parameter. Acceptable values are: * "e": exclude * "i": include

Sets the site search filter query property to the given value.

Specifies a given site which should always be included or excluded from results (see siteSearchFilter parameter, below).

Sets the site search query property to the given value.

source

pub fn search_type(self, new_value: &str) -> CseListCall<'a, S>

Specifies the search type: image. If unspecified, results are limited to webpages. Acceptable values are: * "image": custom image search.

Sets the search type query property to the given value.

source

pub fn safe(self, new_value: &str) -> CseListCall<'a, S>

Search safety level. Acceptable values are: * "active": Enables SafeSearch filtering. * "off": Disables SafeSearch filtering. (default)

Sets the safe query property to the given value.

source

pub fn rights(self, new_value: &str) -> CseListCall<'a, S>

Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these. See typical combinations.

Sets the rights query property to the given value.

source

pub fn related_site(self, new_value: &str) -> CseListCall<'a, S>

Deprecated.

Sets the related site query property to the given value.

source

pub fn q(self, new_value: &str) -> CseListCall<'a, S>

Query

Sets the q query property to the given value.

source

pub fn or_terms(self, new_value: &str) -> CseListCall<'a, S>

Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms.

Sets the or terms query property to the given value.

source

pub fn num(self, new_value: i32) -> CseListCall<'a, S>

Number of search results to return. * Valid values are integers between 1 and 10, inclusive.

Sets the num query property to the given value.

source

pub fn lr(self, new_value: &str) -> CseListCall<'a, S>

Restricts the search to documents written in a particular language (e.g., lr=lang_ja). Acceptable values are: * "lang_ar": Arabic * "lang_bg": Bulgarian * "lang_ca": Catalan * "lang_cs": Czech * "lang_da": Danish * "lang_de": German * "lang_el": Greek * "lang_en": English * "lang_es": Spanish * "lang_et": Estonian * "lang_fi": Finnish * "lang_fr": French * "lang_hr": Croatian * "lang_hu": Hungarian * "lang_id": Indonesian * "lang_is": Icelandic * "lang_it": Italian * "lang_iw": Hebrew * "lang_ja": Japanese * "lang_ko": Korean * "lang_lt": Lithuanian * "lang_lv": Latvian * "lang_nl": Dutch * "lang_no": Norwegian * "lang_pl": Polish * "lang_pt": Portuguese * "lang_ro": Romanian * "lang_ru": Russian * "lang_sk": Slovak * "lang_sl": Slovenian * "lang_sr": Serbian * "lang_sv": Swedish * "lang_tr": Turkish * "lang_zh-CN": Chinese (Simplified) * "lang_zh-TW": Chinese (Traditional)

Sets the lr query property to the given value.

source

pub fn low_range(self, new_value: &str) -> CseListCall<'a, S>

Specifies the starting value for a search range. Use lowRange and highRange to append an inclusive search range of lowRange...highRange to the query.

Sets the low range query property to the given value.

Specifies that all search results should contain a link to a particular URL.

Sets the link site query property to the given value.

source

pub fn img_type(self, new_value: &str) -> CseListCall<'a, S>

Returns images of a type. Acceptable values are: * "clipart" * "face" * "lineart" * "stock" * "photo" * "animated"

Sets the img type query property to the given value.

source

pub fn img_size(self, new_value: &str) -> CseListCall<'a, S>

Returns images of a specified size. Acceptable values are: * "huge" * "icon" * "large" * "medium" * "small" * "xlarge" * "xxlarge"

Sets the img size query property to the given value.

source

pub fn img_dominant_color(self, new_value: &str) -> CseListCall<'a, S>

Returns images of a specific dominant color. Acceptable values are: * "black" * "blue" * "brown" * "gray" * "green" * "orange" * "pink" * "purple" * "red" * "teal" * "white" * "yellow"

Sets the img dominant color query property to the given value.

source

pub fn img_color_type(self, new_value: &str) -> CseListCall<'a, S>

Returns black and white, grayscale, transparent, or color images. Acceptable values are: * "color" * "gray" * "mono": black and white * "trans": transparent background

Sets the img color type query property to the given value.

source

pub fn hq(self, new_value: &str) -> CseListCall<'a, S>

Appends the specified query terms to the query, as if they were combined with a logical AND operator.

Sets the hq query property to the given value.

source

pub fn hl(self, new_value: &str) -> CseListCall<'a, S>

Sets the user interface language. * Explicitly setting this parameter improves the performance and the quality of your search results. * See the Interface Languages section of Internationalizing Queries and Results Presentation for more information, and Supported Interface Languages for a list of supported languages.

Sets the hl query property to the given value.

source

pub fn high_range(self, new_value: &str) -> CseListCall<'a, S>

Specifies the ending value for a search range. * Use lowRange and highRange to append an inclusive search range of lowRange...highRange to the query.

Sets the high range query property to the given value.

source

pub fn googlehost(self, new_value: &str) -> CseListCall<'a, S>

Deprecated. Use the gl parameter for a similar effect. The local Google domain (for example, google.com, google.de, or google.fr) to use to perform the search.

Sets the googlehost query property to the given value.

source

pub fn gl(self, new_value: &str) -> CseListCall<'a, S>

Geolocation of end user. * The gl parameter value is a two-letter country code. The gl parameter boosts search results whose country of origin matches the parameter value. See the Country Codes page for a list of valid values. * Specifying a gl parameter value should lead to more relevant results. This is particularly true for international customers and, even more specifically, for customers in English- speaking countries other than the United States.

Sets the gl query property to the given value.

source

pub fn filter(self, new_value: &str) -> CseListCall<'a, S>

Controls turning on or off the duplicate content filter. * See Automatic Filtering for more information about Google’s search results filters. Note that host crowding filtering applies only to multi-site searches. * By default, Google applies filtering to all search results to improve the quality of those results. Acceptable values are: * 0: Turns off duplicate content filter. * 1: Turns on duplicate content filter.

Sets the filter query property to the given value.

source

pub fn file_type(self, new_value: &str) -> CseListCall<'a, S>

Restricts results to files of a specified extension. A list of file types indexable by Google can be found in Search Console Help Center.

Sets the file type query property to the given value.

source

pub fn exclude_terms(self, new_value: &str) -> CseListCall<'a, S>

Identifies a word or phrase that should not appear in any documents in the search results.

Sets the exclude terms query property to the given value.

source

pub fn exact_terms(self, new_value: &str) -> CseListCall<'a, S>

Identifies a phrase that all documents in the search results must contain.

Sets the exact terms query property to the given value.

source

pub fn date_restrict(self, new_value: &str) -> CseListCall<'a, S>

Restricts results to URLs based on date. Supported values include: * d[number]: requests results from the specified number of past days. * w[number]: requests results from the specified number of past weeks. * m[number]: requests results from the specified number of past months. * y[number]: requests results from the specified number of past years.

Sets the date restrict query property to the given value.

source

pub fn cx(self, new_value: &str) -> CseListCall<'a, S>

The Programmable Search Engine ID to use for this request.

Sets the cx query property to the given value.

source

pub fn cr(self, new_value: &str) -> CseListCall<'a, S>

Restricts search results to documents originating in a particular country. You may use Boolean operators in the cr parameter’s value. Google Search determines the country of a document by analyzing: * the top-level domain (TLD) of the document’s URL * the geographic location of the Web server’s IP address See the Country Parameter Values page for a list of valid values for this parameter.

Sets the cr query property to the given value.

source

pub fn c2coff(self, new_value: &str) -> CseListCall<'a, S>

Enables or disables Simplified and Traditional Chinese Search. The default value for this parameter is 0 (zero), meaning that the feature is enabled. Supported values are: * 1: Disabled * 0: Enabled (default)

Sets the c2coff query property to the given value.

source

pub fn delegate(self, new_value: &'a mut dyn Delegate) -> CseListCall<'a, S>

The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong while executing the actual API request.

                  It should be used to handle progress information, and to implement a certain level of resilience.

Sets the delegate property to the given value.

source

pub fn param<T>(self, name: T, value: T) -> CseListCall<'a, S>
where T: AsRef<str>,

Set any additional parameter of the query string used in the request. It should be used to set parameters which are not yet available through their own setters.

Please note that this method must not be used to set any of the known parameters which have their own setter method. If done anyway, the request will fail.

§Additional Parameters
  • $.xgafv (query-string) - V1 error format.
  • access_token (query-string) - OAuth access token.
  • alt (query-string) - Data format for response.
  • callback (query-string) - JSONP
  • fields (query-string) - Selector specifying which fields to include in a partial response.
  • key (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • oauth_token (query-string) - OAuth 2.0 token for the current user.
  • prettyPrint (query-boolean) - Returns response with indentations and line breaks.
  • quotaUser (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • uploadType (query-string) - Legacy upload protocol for media (e.g. “media”, “multipart”).
  • upload_protocol (query-string) - Upload protocol for media (e.g. “raw”, “multipart”).

Trait Implementations§

source§

impl<'a, S> CallBuilder for CseListCall<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for CseListCall<'a, S>

§

impl<'a, S> Send for CseListCall<'a, S>
where S: Sync,

§

impl<'a, S> !Sync for CseListCall<'a, S>

§

impl<'a, S> Unpin for CseListCall<'a, S>

§

impl<'a, S> !UnwindSafe for CseListCall<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more