pub struct LobbyListFilter<'a> {
    pub string: Option<StringFilters<'a>>,
    pub number: Option<NumberFilters<'a>>,
    pub near_value: Option<NearFilters<'a>>,
    pub open_slots: Option<u8>,
    pub distance: Option<DistanceFilter>,
    pub count: Option<u64>,
}
Expand description

Filters for the lobbies to be returned from request_lobby_list.

This struct is designed to be used as part of the filtering process when calling the [set_lobby_list_filter] method.

§Fields

  • string: A string comparison filter that matches lobby attributes with specific strings.
  • number: A number comparison filter that matches lobby attributes with specific integer values.
  • near_value: Specifies a value, and the results will be sorted closest to this value (no actual filtering).
  • open_slots: Filters lobbies based on the number of open slots they have.
  • distance: Filters lobbies based on a distance criterion.
  • count: Specifies the maximum number of lobby results to be returned.

Fields§

§string: Option<StringFilters<'a>>

A string comparison filter that matches lobby attributes with specific strings.

§number: Option<NumberFilters<'a>>

A number comparison filter that matches lobby attributes with specific integer values

§near_value: Option<NearFilters<'a>>

Specifies a value, and the results will be sorted closest to this value (no actual filtering)

§open_slots: Option<u8>

Filters lobbies based on the number of open slots they have

§distance: Option<DistanceFilter>

Filters lobbies based on a distance criterion

§count: Option<u64>

Specifies the maximum number of lobby results to be returned

Implementations§

source§

impl<'a> LobbyListFilter<'a>

source

pub fn set_string(self, string: Option<StringFilters<'a>>) -> Self

Sets the string comparison filter for the lobby list filter.

§Arguments
  • string: A tuple containing the attribute name and the target string value to match.
source

pub fn set_number(self, number: Option<NumberFilters<'a>>) -> Self

Sets the number comparison filter for the lobby list filter.

§Arguments
  • number: A tuple containing the attribute name and the target integer value to match.
source

pub fn set_near_value(self, near_value: Option<NearFilters<'a>>) -> Self

Sets the near value filter for the lobby list filter.

§Arguments
  • near_value: A tuple containing the attribute name and the reference integer value. Lobby results will be sorted based on their closeness to this value.
source

pub fn set_open_slots(self, open_slots: Option<u8>) -> Self

Sets the open slots filter for the lobby list filter.

§Arguments
  • open_slots: The number of open slots to filter lobbies by.
source

pub fn set_distance(self, distance: Option<DistanceFilter>) -> Self

Sets the distance filter for the lobby list filter.

§Arguments
  • distance: A distance filter that specifies a distance criterion for filtering lobbies.
source

pub fn set_count(self, count: Option<u64>) -> Self

Sets the maximum number of lobby results to be returned.

§Arguments
  • count: The maximum number of lobby results to retrieve.

Trait Implementations§

source§

impl<'a> Clone for LobbyListFilter<'a>

source§

fn clone(&self) -> LobbyListFilter<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for LobbyListFilter<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for LobbyListFilter<'a>

source§

fn default() -> LobbyListFilter<'a>

Returns the “default value” for a type. Read more
source§

impl<'a> PartialEq for LobbyListFilter<'a>

source§

fn eq(&self, other: &LobbyListFilter<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> StructuralPartialEq for LobbyListFilter<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for LobbyListFilter<'a>

§

impl<'a> Send for LobbyListFilter<'a>

§

impl<'a> Sync for LobbyListFilter<'a>

§

impl<'a> Unpin for LobbyListFilter<'a>

§

impl<'a> UnwindSafe for LobbyListFilter<'a>

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.