Struct discord_sdk::lobby::search::SearchQuery
source · pub struct SearchQuery { /* private fields */ }
Expand description
A query used to search for lobbies that match a set of criteria.
By default, this will find a maximum of 25
lobbies in the same or adjacent
regions as the current user.
Implementations§
source§impl SearchQuery
impl SearchQuery
sourcepub fn add_filter<'md>(
self,
key: impl Into<SearchKey<'md>>,
comparison: LobbySearchComparison,
value: SearchValue
) -> Self
pub fn add_filter<'md>( self, key: impl Into<SearchKey<'md>>, comparison: LobbySearchComparison, value: SearchValue ) -> Self
Adds a filter to the query which compares the value of the specified key with the specified comparison against the specified value.
sourcepub fn add_sort<'md>(
self,
key: impl Into<SearchKey<'md>>,
value: SearchValue
) -> Self
pub fn add_sort<'md>( self, key: impl Into<SearchKey<'md>>, value: SearchValue ) -> Self
Sorts the filtered lobbies based on “near-ness” of the specified key’s value to the specified sort value.
sourcepub fn limit(self, max_results: Option<NonZeroU32>) -> Self
pub fn limit(self, max_results: Option<NonZeroU32>) -> Self
Sets the maximum number of lobbies that can be returned by the search.
sourcepub fn distance(self, distance: LobbySearchDistance) -> Self
pub fn distance(self, distance: LobbySearchDistance) -> Self
Filters lobby results to within certain regions relative to the user’s location.
Trait Implementations§
source§impl Default for SearchQuery
impl Default for SearchQuery
Auto Trait Implementations§
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnwindSafe for SearchQuery
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
Mutably borrows from an owned value. Read more