pub struct QueryHandle { /* private fields */ }Expand description
Query handle, to allow for more filtering.
Implementations§
Source§impl QueryHandle
impl QueryHandle
Sourcepub fn exclude_tag(self, tag: &str) -> QueryHandle
pub fn exclude_tag(self, tag: &str) -> QueryHandle
Excludes items with a specific tag.
Panics if tag could not be converted to a CString.
Sourcepub fn require_tag(self, tag: &str) -> QueryHandle
pub fn require_tag(self, tag: &str) -> QueryHandle
Only include items with a specific tag.
Panics if tag could not be converted to a CString.
Sourcepub fn any_required(self, any: bool) -> QueryHandle
pub fn any_required(self, any: bool) -> QueryHandle
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) -> QueryHandle
pub fn language(self, language: &str) -> QueryHandle
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) -> QueryHandle
pub fn allow_cached_response(self, max_age_s: u32) -> QueryHandle
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) -> QueryHandle
pub fn include_long_desc(self, include: bool) -> QueryHandle
Include the full description in results
Sourcepub fn include_children(self, include: bool) -> QueryHandle
pub fn include_children(self, include: bool) -> QueryHandle
Include children in results
Sourcepub fn include_metadata(self, include: bool) -> QueryHandle
pub fn include_metadata(self, include: bool) -> QueryHandle
Include metadata in results
Sourcepub fn include_additional_previews(self, include: bool) -> QueryHandle
pub fn include_additional_previews(self, include: bool) -> QueryHandle
Include additional previews in results
Include key value tags in results
Sourcepub fn add_required_tag(self, tag: &str) -> QueryHandle
pub fn add_required_tag(self, tag: &str) -> QueryHandle
Adds a tag that must be present on all returned items.
Sourcepub fn add_excluded_tag(self, tag: &str) -> QueryHandle
pub fn add_excluded_tag(self, tag: &str) -> QueryHandle
Adds a tag that must not be present on any returned items.
Sourcepub fn set_return_only_ids(self, return_only_ids: bool) -> QueryHandle
pub fn set_return_only_ids(self, return_only_ids: bool) -> QueryHandle
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) -> QueryHandle
pub fn set_return_long_description(self, return_long_desc: bool) -> QueryHandle
Sets whether to return the full description of the items.
Sourcepub fn set_return_metadata(self, return_metadata: bool) -> QueryHandle
pub fn set_return_metadata(self, return_metadata: bool) -> QueryHandle
Sets whether to return metadata with the items.
Sourcepub fn set_return_children(self, return_children: bool) -> QueryHandle
pub fn set_return_children(self, return_children: bool) -> QueryHandle
Sets whether to return children with the items.
Sourcepub fn set_return_additional_previews(
self,
return_additional_previews: bool,
) -> QueryHandle
pub fn set_return_additional_previews( self, return_additional_previews: bool, ) -> QueryHandle
Sets whether to return additional previews with the items.
Sourcepub fn set_return_total_only(self, return_total_only: bool) -> QueryHandle
pub fn set_return_total_only(self, return_total_only: bool) -> QueryHandle
Sets whether to only return the total number of items.
Sourcepub fn set_language(self, language: &str) -> QueryHandle
pub fn set_language(self, language: &str) -> QueryHandle
Sets the language to return the title and description in.
Sourcepub fn set_allow_cached_response(self, max_age_seconds: u32) -> QueryHandle
pub fn set_allow_cached_response(self, max_age_seconds: u32) -> QueryHandle
Sets whether results will be returned from the cache.
Sourcepub fn set_cloud_file_name_filter(self, file_name: &str) -> QueryHandle
pub fn set_cloud_file_name_filter(self, file_name: &str) -> QueryHandle
Sets a filter for the cloud file name.
Sourcepub fn set_match_any_tag(self, match_any_tag: bool) -> QueryHandle
pub fn set_match_any_tag(self, match_any_tag: bool) -> QueryHandle
Sets whether any of the required tags are sufficient for an item to be returned.
Sourcepub fn set_search_text(self, search_text: &str) -> QueryHandle
pub fn set_search_text(self, search_text: &str) -> QueryHandle
Sets the full-text search string.
Sourcepub fn set_ranked_by_trend_days(self, days: u32) -> QueryHandle
pub fn set_ranked_by_trend_days(self, days: u32) -> QueryHandle
Sets the number of days to consider for trending items.
Sourcepub fn add_required_key_value_tag(self, key: &str, value: &str) -> QueryHandle
pub fn add_required_key_value_tag(self, key: &str, value: &str) -> QueryHandle
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryHandle
impl RefUnwindSafe for QueryHandle
impl !Send for QueryHandle
impl !Sync for QueryHandle
impl Unpin for QueryHandle
impl UnwindSafe for QueryHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.