SearchRequest

Struct SearchRequest 

Source
#[non_exhaustive]
pub struct SearchRequest {
Show 31 fields pub serving_config: String, pub branch: String, pub query: String, pub image_query: Option<ImageQuery>, pub page_size: i32, pub page_token: String, pub offset: i32, pub one_box_page_size: i32, pub data_store_specs: Vec<DataStoreSpec>, pub filter: String, pub canonical_filter: String, pub order_by: String, pub user_info: Option<UserInfo>, pub language_code: String, pub facet_specs: Vec<FacetSpec>, pub boost_spec: Option<BoostSpec>, pub params: HashMap<String, Value>, pub query_expansion_spec: Option<QueryExpansionSpec>, pub spell_correction_spec: Option<SpellCorrectionSpec>, pub user_pseudo_id: String, pub content_search_spec: Option<ContentSearchSpec>, pub safe_search: bool, pub user_labels: HashMap<String, String>, pub search_as_you_type_spec: Option<SearchAsYouTypeSpec>, pub display_spec: Option<DisplaySpec>, pub session: String, pub session_spec: Option<SessionSpec>, pub relevance_threshold: RelevanceThreshold, pub relevance_score_spec: Option<RelevanceScoreSpec>, pub ranking_expression: String, pub ranking_expression_backend: RankingExpressionBackend, /* private fields */
}
Available on crate features assistant-service or conversational-search-service or search-service or serving-config-service only.
Expand description

Request message for SearchService.Search method.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§serving_config: String

Required. The resource name of the Search serving config, such as projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config, or projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config. This field is used to identify the serving configuration name, set of models used to make the search.

§branch: String

The branch resource name, such as projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0.

Use default_branch as the branch ID or leave this field empty, to search documents under the default branch.

§query: String

Raw search query.

§image_query: Option<ImageQuery>

Raw image query.

§page_size: i32

Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value.

  • Websites with basic indexing: Default 10, Maximum 25.
  • Websites with advanced indexing: Default 25, Maximum 50.
  • Other: Default 50, Maximum 100.

If this field is negative, an INVALID_ARGUMENT is returned.

§page_token: String

A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.

§offset: i32

A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset.

If this field is negative, an INVALID_ARGUMENT is returned.

§one_box_page_size: i32

The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10.

§data_store_specs: Vec<DataStoreSpec>

Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used.

§filter: String

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend – this mapping is defined by the customer in their schema. For example a media customer might have a field ‘name’ in their schema. In this case the filter would look like this: filter –> name:‘ANY(“king kong”)’

For more information about filtering including syntax and filter operators, see Filter

§canonical_filter: String

The default filter that is applied when a user performs a search without checking any filters on the search page.

The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality.

For more information about filter syntax, see SearchRequest.filter.

§order_by: String

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive.

For more information on ordering the website search results, see Order web search results. For more information on ordering the healthcare search results, see Order healthcare search results. If this field is unrecognizable, an INVALID_ARGUMENT is returned.

§user_info: Option<UserInfo>

Information about the end user. Highly recommended for analytics and personalization. UserInfo.user_agent is used to deduce device_type for analytics.

§language_code: String

The BCP-47 language code, such as “en-US” or “sr-Latn”. For more information, see Standard fields. This field helps to better interpret the query. If a value isn’t specified, the query language code is automatically detected, which may not be accurate.

§facet_specs: Vec<FacetSpec>

Facet specifications for faceted search. If empty, no facets are returned.

A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.

§boost_spec: Option<BoostSpec>

Boost specification to boost certain documents. For more information on boosting, see Boosting

§params: HashMap<String, Value>

Additional search parameters.

For public website search only, supported values are:

  • user_country_code: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, user_country_code: "au"

    For available codes see Country Codes

  • search_type: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, search_type: 1

§query_expansion_spec: Option<QueryExpansionSpec>

The query expansion specification that specifies the conditions under which query expansion occurs.

§spell_correction_spec: Option<SpellCorrectionSpec>

The spell correction specification that specifies the mode under which spell correction takes effect.

§user_pseudo_id: String

A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

This field should NOT have a fixed value such as unknown_visitor.

This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id

The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

§content_search_spec: Option<ContentSearchSpec>

A specification for configuring the behavior of content search.

§safe_search: bool

Whether to turn on safe search. This is only supported for website search.

§user_labels: HashMap<String, String>

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

See Google Cloud Document for more details.

§search_as_you_type_spec: Option<SearchAsYouTypeSpec>

Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical.

§display_spec: Option<DisplaySpec>

Optional. Config for display feature, like match highlighting on search results.

§session: String

The session resource name. Optional.

Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls.

Example #1 (multi-turn /search API calls): Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is “How did Alphabet do in 2022?” and the current query is “How about 2023?”, the current query will be interpreted as “How did Alphabet do in 2023?”.

Example #2 (coordination between /search API calls and /answer API calls): Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call.

Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.

§session_spec: Option<SessionSpec>

Session specification.

Can be used only when session is set.

§relevance_threshold: RelevanceThreshold

The relevance threshold of the search results.

Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.

This feature is not supported for healthcare search.

§relevance_score_spec: Option<RelevanceScoreSpec>

Optional. The specification for returning the relevance score.

§ranking_expression: String

The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The syntax and supported features depend on the ranking_expression_backend value. If ranking_expression_backend is not provided, it defaults to RANK_BY_EMBEDDING.

If ranking_expression_backend is not provided or set to RANK_BY_EMBEDDING, it should be a single function or multiple functions that are joined by “+”.

  • ranking_expression = function, { “ + “, function };

Supported functions:

  • double * relevance_score
  • double * dotProduct(embedding_field_path)

Function variables:

  • relevance_score: pre-defined keywords, used for measure relevance between query and document.
  • embedding_field_path: the document embedding field used with query embedding vector.
  • dotProduct: embedding function between embedding_field_path and query embedding vector.

Example ranking expression:

If document has an embedding field doc_embedding, the ranking expression could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).

If ranking_expression_backend is set to RANK_BY_FORMULA, the following expression types (and combinations of those chained using + or

  • operators) are supported:

    • double
    • signal
    • log(signal)
    • exp(signal)
    • rr(signal, double > 0) – reciprocal rank transformation with second argument being a denominator constant.
    • is_nan(signal) – returns 0 if signal is NaN, 1 otherwise.
    • fill_nan(signal1, signal2 | double) – if signal1 is NaN, returns signal2 | double, else returns signal1.

The following signals are supported:

  • semantic_similarity_score: semantic similarity adjustment that is calculated using the embeddings generated by a proprietary Google model. This score determines how semantically similar a search query is to a document.
  • keyword_similarity_score: keyword match adjustment uses the Best Match 25 (BM25) ranking function. This score is calculated using a probabilistic model to estimate the probability that a document is relevant to a given query.
  • relevance_score: semantic relevance adjustment that uses a proprietary Google model to determine the meaning and intent behind a user’s query in context with the content in the documents.
  • pctr_rank: predicted conversion rate adjustment as a rank use predicted Click-through rate (pCTR) to gauge the relevance and attractiveness of a search result from a user’s perspective. A higher pCTR suggests that the result is more likely to satisfy the user’s query and intent, making it a valuable signal for ranking.
  • freshness_rank: freshness adjustment as a rank
  • document_age: The time in hours elapsed since the document was last updated, a floating-point number (e.g., 0.25 means 15 minutes).
  • topicality_rank: topicality adjustment as a rank. Uses proprietary Google model to determine the keyword-based overlap between the query and the document.
  • base_rank: the default rank of the result
§ranking_expression_backend: RankingExpressionBackend

The backend to use for the ranking expression evaluation.

Implementations§

Source§

impl SearchRequest

Source

pub fn new() -> Self

Source

pub fn set_serving_config<T: Into<String>>(self, v: T) -> Self

Sets the value of serving_config.

§Example
let x = SearchRequest::new().set_serving_config("example");
Source

pub fn set_branch<T: Into<String>>(self, v: T) -> Self

Sets the value of branch.

§Example
let x = SearchRequest::new().set_branch("example");
Source

pub fn set_query<T: Into<String>>(self, v: T) -> Self

Sets the value of query.

§Example
let x = SearchRequest::new().set_query("example");
Source

pub fn set_image_query<T>(self, v: T) -> Self
where T: Into<ImageQuery>,

Sets the value of image_query.

§Example
use google_cloud_discoveryengine_v1::model::search_request::ImageQuery;
let x = SearchRequest::new().set_image_query(ImageQuery::default()/* use setters */);
Source

pub fn set_or_clear_image_query<T>(self, v: Option<T>) -> Self
where T: Into<ImageQuery>,

Sets or clears the value of image_query.

§Example
use google_cloud_discoveryengine_v1::model::search_request::ImageQuery;
let x = SearchRequest::new().set_or_clear_image_query(Some(ImageQuery::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_image_query(None::<ImageQuery>);
Source

pub fn set_page_size<T: Into<i32>>(self, v: T) -> Self

Sets the value of page_size.

§Example
let x = SearchRequest::new().set_page_size(42);
Source

pub fn set_page_token<T: Into<String>>(self, v: T) -> Self

Sets the value of page_token.

§Example
let x = SearchRequest::new().set_page_token("example");
Source

pub fn set_offset<T: Into<i32>>(self, v: T) -> Self

Sets the value of offset.

§Example
let x = SearchRequest::new().set_offset(42);
Source

pub fn set_one_box_page_size<T: Into<i32>>(self, v: T) -> Self

Sets the value of one_box_page_size.

§Example
let x = SearchRequest::new().set_one_box_page_size(42);
Source

pub fn set_data_store_specs<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<DataStoreSpec>,

Sets the value of data_store_specs.

§Example
use google_cloud_discoveryengine_v1::model::search_request::DataStoreSpec;
let x = SearchRequest::new()
    .set_data_store_specs([
        DataStoreSpec::default()/* use setters */,
        DataStoreSpec::default()/* use (different) setters */,
    ]);
Source

pub fn set_filter<T: Into<String>>(self, v: T) -> Self

Sets the value of filter.

§Example
let x = SearchRequest::new().set_filter("example");
Source

pub fn set_canonical_filter<T: Into<String>>(self, v: T) -> Self

Sets the value of canonical_filter.

§Example
let x = SearchRequest::new().set_canonical_filter("example");
Source

pub fn set_order_by<T: Into<String>>(self, v: T) -> Self

Sets the value of order_by.

§Example
let x = SearchRequest::new().set_order_by("example");
Source

pub fn set_user_info<T>(self, v: T) -> Self
where T: Into<UserInfo>,

Sets the value of user_info.

§Example
use google_cloud_discoveryengine_v1::model::UserInfo;
let x = SearchRequest::new().set_user_info(UserInfo::default()/* use setters */);
Source

pub fn set_or_clear_user_info<T>(self, v: Option<T>) -> Self
where T: Into<UserInfo>,

Sets or clears the value of user_info.

§Example
use google_cloud_discoveryengine_v1::model::UserInfo;
let x = SearchRequest::new().set_or_clear_user_info(Some(UserInfo::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_user_info(None::<UserInfo>);
Source

pub fn set_language_code<T: Into<String>>(self, v: T) -> Self

Sets the value of language_code.

§Example
let x = SearchRequest::new().set_language_code("example");
Source

pub fn set_facet_specs<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<FacetSpec>,

Sets the value of facet_specs.

§Example
use google_cloud_discoveryengine_v1::model::search_request::FacetSpec;
let x = SearchRequest::new()
    .set_facet_specs([
        FacetSpec::default()/* use setters */,
        FacetSpec::default()/* use (different) setters */,
    ]);
Source

pub fn set_boost_spec<T>(self, v: T) -> Self
where T: Into<BoostSpec>,

Sets the value of boost_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = SearchRequest::new().set_boost_spec(BoostSpec::default()/* use setters */);
Source

pub fn set_or_clear_boost_spec<T>(self, v: Option<T>) -> Self
where T: Into<BoostSpec>,

Sets or clears the value of boost_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = SearchRequest::new().set_or_clear_boost_spec(Some(BoostSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_boost_spec(None::<BoostSpec>);
Source

pub fn set_params<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<Value>,

Sets the value of params.

§Example
use wkt::Value;
let x = SearchRequest::new().set_params([
    ("key0", Value::default()/* use setters */),
    ("key1", Value::default()/* use (different) setters */),
]);
Source

pub fn set_query_expansion_spec<T>(self, v: T) -> Self

Sets the value of query_expansion_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::QueryExpansionSpec;
let x = SearchRequest::new().set_query_expansion_spec(QueryExpansionSpec::default()/* use setters */);
Source

pub fn set_or_clear_query_expansion_spec<T>(self, v: Option<T>) -> Self

Sets or clears the value of query_expansion_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::QueryExpansionSpec;
let x = SearchRequest::new().set_or_clear_query_expansion_spec(Some(QueryExpansionSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_query_expansion_spec(None::<QueryExpansionSpec>);
Source

pub fn set_spell_correction_spec<T>(self, v: T) -> Self

Sets the value of spell_correction_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SpellCorrectionSpec;
let x = SearchRequest::new().set_spell_correction_spec(SpellCorrectionSpec::default()/* use setters */);
Source

pub fn set_or_clear_spell_correction_spec<T>(self, v: Option<T>) -> Self

Sets or clears the value of spell_correction_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SpellCorrectionSpec;
let x = SearchRequest::new().set_or_clear_spell_correction_spec(Some(SpellCorrectionSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_spell_correction_spec(None::<SpellCorrectionSpec>);
Source

pub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self

Sets the value of user_pseudo_id.

§Example
let x = SearchRequest::new().set_user_pseudo_id("example");
Source

pub fn set_content_search_spec<T>(self, v: T) -> Self

Sets the value of content_search_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::ContentSearchSpec;
let x = SearchRequest::new().set_content_search_spec(ContentSearchSpec::default()/* use setters */);
Source

pub fn set_or_clear_content_search_spec<T>(self, v: Option<T>) -> Self

Sets or clears the value of content_search_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::ContentSearchSpec;
let x = SearchRequest::new().set_or_clear_content_search_spec(Some(ContentSearchSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_content_search_spec(None::<ContentSearchSpec>);

Sets the value of safe_search.

§Example
let x = SearchRequest::new().set_safe_search(true);
Source

pub fn set_user_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of user_labels.

§Example
let x = SearchRequest::new().set_user_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_search_as_you_type_spec<T>(self, v: T) -> Self

Sets the value of search_as_you_type_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SearchAsYouTypeSpec;
let x = SearchRequest::new().set_search_as_you_type_spec(SearchAsYouTypeSpec::default()/* use setters */);
Source

pub fn set_or_clear_search_as_you_type_spec<T>(self, v: Option<T>) -> Self

Sets or clears the value of search_as_you_type_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SearchAsYouTypeSpec;
let x = SearchRequest::new().set_or_clear_search_as_you_type_spec(Some(SearchAsYouTypeSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_search_as_you_type_spec(None::<SearchAsYouTypeSpec>);
Source

pub fn set_display_spec<T>(self, v: T) -> Self
where T: Into<DisplaySpec>,

Sets the value of display_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::DisplaySpec;
let x = SearchRequest::new().set_display_spec(DisplaySpec::default()/* use setters */);
Source

pub fn set_or_clear_display_spec<T>(self, v: Option<T>) -> Self
where T: Into<DisplaySpec>,

Sets or clears the value of display_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::DisplaySpec;
let x = SearchRequest::new().set_or_clear_display_spec(Some(DisplaySpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_display_spec(None::<DisplaySpec>);
Source

pub fn set_session<T: Into<String>>(self, v: T) -> Self

Sets the value of session.

§Example
let x = SearchRequest::new().set_session("example");
Source

pub fn set_session_spec<T>(self, v: T) -> Self
where T: Into<SessionSpec>,

Sets the value of session_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SessionSpec;
let x = SearchRequest::new().set_session_spec(SessionSpec::default()/* use setters */);
Source

pub fn set_or_clear_session_spec<T>(self, v: Option<T>) -> Self
where T: Into<SessionSpec>,

Sets or clears the value of session_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::SessionSpec;
let x = SearchRequest::new().set_or_clear_session_spec(Some(SessionSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_session_spec(None::<SessionSpec>);
Source

pub fn set_relevance_threshold<T: Into<RelevanceThreshold>>(self, v: T) -> Self

Sets the value of relevance_threshold.

§Example
use google_cloud_discoveryengine_v1::model::search_request::RelevanceThreshold;
let x0 = SearchRequest::new().set_relevance_threshold(RelevanceThreshold::Lowest);
let x1 = SearchRequest::new().set_relevance_threshold(RelevanceThreshold::Low);
let x2 = SearchRequest::new().set_relevance_threshold(RelevanceThreshold::Medium);
Source

pub fn set_relevance_score_spec<T>(self, v: T) -> Self

Sets the value of relevance_score_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::RelevanceScoreSpec;
let x = SearchRequest::new().set_relevance_score_spec(RelevanceScoreSpec::default()/* use setters */);
Source

pub fn set_or_clear_relevance_score_spec<T>(self, v: Option<T>) -> Self

Sets or clears the value of relevance_score_spec.

§Example
use google_cloud_discoveryengine_v1::model::search_request::RelevanceScoreSpec;
let x = SearchRequest::new().set_or_clear_relevance_score_spec(Some(RelevanceScoreSpec::default()/* use setters */));
let x = SearchRequest::new().set_or_clear_relevance_score_spec(None::<RelevanceScoreSpec>);
Source

pub fn set_ranking_expression<T: Into<String>>(self, v: T) -> Self

Sets the value of ranking_expression.

§Example
let x = SearchRequest::new().set_ranking_expression("example");
Source

pub fn set_ranking_expression_backend<T: Into<RankingExpressionBackend>>( self, v: T, ) -> Self

Sets the value of ranking_expression_backend.

§Example
use google_cloud_discoveryengine_v1::model::search_request::RankingExpressionBackend;
let x0 = SearchRequest::new().set_ranking_expression_backend(RankingExpressionBackend::RankByEmbedding);
let x1 = SearchRequest::new().set_ranking_expression_backend(RankingExpressionBackend::RankByFormula);

Trait Implementations§

Source§

impl Clone for SearchRequest

Source§

fn clone(&self) -> SearchRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SearchRequest

Source§

fn default() -> SearchRequest

Returns the “default value” for a type. Read more
Source§

impl Message for SearchRequest

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for SearchRequest

Source§

fn eq(&self, other: &SearchRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SearchRequest

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,