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>

source

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

Excludes items with a specific tag.

Panics if tag could not be converted to a CString.

source

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.

source

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.

source

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”

source

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.

source

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

Include the full description in results

source

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

Include children in results

source

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

Include metadata in results

source

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

Include additional previews in results

source

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

Include key value tags in results

source

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

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

source

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

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

source

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

Sets whether to only return the IDs of the items.

source

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

Sets whether to return key value tags with the items.

source

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

Sets whether to return the full description of the items.

source

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

Sets whether to return metadata with the items.

source

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

Sets whether to return children with the items.

source

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

Sets whether to return additional previews with the items.

source

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

Sets whether to only return the total number of items.

source

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

Sets the language to return the title and description in.

source

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

Sets whether results will be returned from the cache.

source

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

Sets a filter for the cloud file name.

source

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.

source

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

Sets the full-text search string.

source

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

Sets the number of days to consider for trending items.

source

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.

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<Manager> Drop for QueryHandle<Manager>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<Manager> RefUnwindSafe for QueryHandle<Manager>
where Manager: RefUnwindSafe,

§

impl<Manager> !Send for QueryHandle<Manager>

§

impl<Manager> !Sync for QueryHandle<Manager>

§

impl<Manager> Unpin for QueryHandle<Manager>

§

impl<Manager> UnwindSafe for QueryHandle<Manager>
where Manager: RefUnwindSafe,

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