Struct steamworks::QueryHandle
source · pub struct QueryHandle<Manager> { /* private fields */ }
Expand description
Query handle, to allow for more filtering.
Implementations§
source§impl<Manager> QueryHandle<Manager>
impl<Manager> QueryHandle<Manager>
sourcepub fn exclude_tag(self, tag: &str) -> Self
pub fn exclude_tag(self, tag: &str) -> Self
Excludes items with a specific tag.
Panics if tag
could not be converted to a CString
.
sourcepub fn require_tag(self, tag: &str) -> Self
pub fn require_tag(self, tag: &str) -> Self
Only include items with a specific tag.
Panics if tag
could not be converted to a CString
.
sourcepub fn any_required(self, any: bool) -> Self
pub fn any_required(self, any: bool) -> Self
Sets how to match tags added by require_tag
. If true
, then any tag may match. If false
, all required tags must match.
sourcepub fn language(self, language: &str) -> Self
pub fn language(self, language: &str) -> Self
Sets the language to return the title and description in for the items on a pending UGC Query.
Defaults to “english”
sourcepub fn allow_cached_response(self, max_age_s: u32) -> Self
pub fn allow_cached_response(self, max_age_s: u32) -> Self
Sets whether results will be returned from the cache for the specific period of time on a pending UGC Query.
Age is in seconds.
sourcepub fn include_long_desc(self, include: bool) -> Self
pub fn include_long_desc(self, include: bool) -> Self
Include the full description in results
sourcepub fn include_children(self, include: bool) -> Self
pub fn include_children(self, include: bool) -> Self
Include children in results
sourcepub fn include_metadata(self, include: bool) -> Self
pub fn include_metadata(self, include: bool) -> Self
Include metadata in results
sourcepub fn include_additional_previews(self, include: bool) -> Self
pub fn include_additional_previews(self, include: bool) -> Self
Include additional previews in results
Include key value tags in results
sourcepub fn add_required_tag(self, tag: &str) -> Self
pub fn add_required_tag(self, tag: &str) -> Self
Adds a tag that must be present on all returned items.
sourcepub fn add_excluded_tag(self, tag: &str) -> Self
pub fn add_excluded_tag(self, tag: &str) -> Self
Adds a tag that must not be present on any returned items.
sourcepub fn set_return_only_ids(self, return_only_ids: bool) -> Self
pub fn set_return_only_ids(self, return_only_ids: bool) -> Self
Sets whether to only return the IDs of the items.
Sets whether to return key value tags with the items.
sourcepub fn set_return_long_description(self, return_long_desc: bool) -> Self
pub fn set_return_long_description(self, return_long_desc: bool) -> Self
Sets whether to return the full description of the items.
sourcepub fn set_return_metadata(self, return_metadata: bool) -> Self
pub fn set_return_metadata(self, return_metadata: bool) -> Self
Sets whether to return metadata with the items.
sourcepub fn set_return_children(self, return_children: bool) -> Self
pub fn set_return_children(self, return_children: bool) -> Self
Sets whether to return children with the items.
sourcepub fn set_return_additional_previews(
self,
return_additional_previews: bool
) -> Self
pub fn set_return_additional_previews( self, return_additional_previews: bool ) -> Self
Sets whether to return additional previews with the items.
sourcepub fn set_return_total_only(self, return_total_only: bool) -> Self
pub fn set_return_total_only(self, return_total_only: bool) -> Self
Sets whether to only return the total number of items.
sourcepub fn set_language(self, language: &str) -> Self
pub fn set_language(self, language: &str) -> Self
Sets the language to return the title and description in.
sourcepub fn set_allow_cached_response(self, max_age_seconds: u32) -> Self
pub fn set_allow_cached_response(self, max_age_seconds: u32) -> Self
Sets whether results will be returned from the cache.
sourcepub fn set_cloud_file_name_filter(self, file_name: &str) -> Self
pub fn set_cloud_file_name_filter(self, file_name: &str) -> Self
Sets a filter for the cloud file name.
sourcepub fn set_match_any_tag(self, match_any_tag: bool) -> Self
pub fn set_match_any_tag(self, match_any_tag: bool) -> Self
Sets whether any of the required tags are sufficient for an item to be returned.
sourcepub fn set_search_text(self, search_text: &str) -> Self
pub fn set_search_text(self, search_text: &str) -> Self
Sets the full-text search string.
sourcepub fn set_ranked_by_trend_days(self, days: u32) -> Self
pub fn set_ranked_by_trend_days(self, days: u32) -> Self
Sets the number of days to consider for trending items.
sourcepub fn add_required_key_value_tag(self, key: &str, value: &str) -> Self
pub fn add_required_key_value_tag(self, key: &str, value: &str) -> Self
Adds a required key-value tag that must be present on all returned items.
sourcepub fn fetch<F>(self, cb: F)
pub fn fetch<F>(self, cb: F)
Sends the query to Steam and calls the provided callback with the results when completed.
sourcepub fn fetch_total<F>(self, cb: F)
pub fn fetch_total<F>(self, cb: F)
Runs the query, only fetching the total number of results.