QueryHandle

Struct QueryHandle 

Source
pub struct QueryHandle { /* private fields */ }
Expand description

Query handle, to allow for more filtering.

Implementations§

Source§

impl QueryHandle

Source

pub fn exclude_tag(self, tag: &str) -> QueryHandle

Excludes items with a specific tag.

Panics if tag could not be converted to a CString.

Source

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.

Source

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.

Source

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”

Source

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.

Source

pub fn include_long_desc(self, include: bool) -> QueryHandle

Include the full description in results

Source

pub fn include_children(self, include: bool) -> QueryHandle

Include children in results

Source

pub fn include_metadata(self, include: bool) -> QueryHandle

Include metadata in results

Source

pub fn include_additional_previews(self, include: bool) -> QueryHandle

Include additional previews in results

Source

pub fn include_key_value_tags(self, include: bool) -> QueryHandle

Include key value tags in results

Source

pub fn add_required_tag(self, tag: &str) -> QueryHandle

Adds a tag that must be present on all returned items.

Source

pub fn add_excluded_tag(self, tag: &str) -> QueryHandle

Adds a tag that must not be present on any returned items.

Source

pub fn set_return_only_ids(self, return_only_ids: bool) -> QueryHandle

Sets whether to only return the IDs of the items.

Source

pub fn set_return_key_value_tags(self, return_kv_tags: bool) -> QueryHandle

Sets whether to return key value tags with the items.

Source

pub fn set_return_long_description(self, return_long_desc: bool) -> QueryHandle

Sets whether to return the full description of the items.

Source

pub fn set_return_metadata(self, return_metadata: bool) -> QueryHandle

Sets whether to return metadata with the items.

Source

pub fn set_return_children(self, return_children: bool) -> QueryHandle

Sets whether to return children with the items.

Source

pub fn set_return_additional_previews( self, return_additional_previews: bool, ) -> QueryHandle

Sets whether to return additional previews with the items.

Source

pub fn set_return_total_only(self, return_total_only: bool) -> QueryHandle

Sets whether to only return the total number of items.

Source

pub fn set_language(self, language: &str) -> QueryHandle

Sets the language to return the title and description in.

Source

pub fn set_allow_cached_response(self, max_age_seconds: u32) -> QueryHandle

Sets whether results will be returned from the cache.

Source

pub fn set_cloud_file_name_filter(self, file_name: &str) -> QueryHandle

Sets a filter for the cloud file name.

Source

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.

Source

pub fn set_search_text(self, search_text: &str) -> QueryHandle

Sets the full-text search string.

Source

pub fn set_ranked_by_trend_days(self, days: u32) -> QueryHandle

Sets the number of days to consider for trending items.

Source

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.

Source

pub fn fetch<F>(self, cb: F)
where F: for<'a> FnOnce(Result<QueryResults<'a>, SteamError>) + 'static + Send,

Sends the query to Steam and calls the provided callback with the results when completed.

Source

pub fn fetch_total<F>(self, cb: F)
where F: Fn(Result<u32, SteamError>) + 'static + Send,

Runs the query, only fetching the total number of results.

Source

pub fn fetch_ids<F>(self, cb: F)
where F: Fn(Result<Vec<PublishedFileId>, SteamError>) + 'static + Send,

Runs the query, only fetching the IDs.

Trait Implementations§

Source§

impl Drop for QueryHandle

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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

Converts 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)

Converts &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)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoResult<T> for T

Source§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
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.