[][src]Struct toornament::MatchFilter

pub struct MatchFilter {
    pub featured: Option<bool>,
    pub has_result: Option<bool>,
    pub sort: Option<DateSortFilter>,
    pub participant_id: Option<ParticipantId>,
    pub tournament_ids: Option<Vec<TournamentId>>,
    pub with_games: bool,
    pub before_date: Option<Date>,
    pub after_date: Option<Date>,
    pub page: Option<i64>,
}

A filter for match endpoints

Fields

featured: Option<bool>

When set to true, returns matches from featured tournaments in the collection. When set to false, it returns matches from tournaments without featured. Featured tournaments are tagged by Toornament as major tournaments for a given discipline.

has_result: Option<bool>

When set to true, returns only matches with a result. When set to false, returns only matches without a result.

sort: Option<DateSortFilter>

Sorts the collection in a particular order. DateAscending sort matches from oldest to newest and DateDescending sort matches from newest to oldest.

participant_id: Option<ParticipantId>

Returns matches that involves the given participant's id.

tournament_ids: Option<Vec<TournamentId>>

Returns matches from the filtered tournaments.

with_games: bool

When set to true, it will include a summary of each game of the match.

before_date: Option<Date>

Filter all matches scheduled before this date.

after_date: Option<Date>

Filter all matches scheduled after this date.

page: Option<i64>

Page requested of the list.

Methods

impl MatchFilter[src]

pub fn featured(self, featured: bool) -> Self[src]

A builder method for $field with Option type.

pub fn has_result(self, has_result: bool) -> Self[src]

A builder method for $field with Option type.

pub fn sort(self, sort: DateSortFilter) -> Self[src]

A builder method for $field with Option type.

pub fn participant_id(self, participant_id: ParticipantId) -> Self[src]

A builder method for $field with Option type.

pub fn tournament_ids(self, tournament_ids: Vec<TournamentId>) -> Self[src]

A builder method for $field with Option type.

pub fn with_games(self, with_games: bool) -> Self[src]

A builder method for $field with $field_type type.

pub fn before_date(self, before_date: Date) -> Self[src]

A builder method for $field with Option type.

pub fn after_date(self, after_date: Date) -> Self[src]

A builder method for $field with Option type.

pub fn page(self, page: i64) -> Self[src]

A builder method for $field with Option type.

Trait Implementations

impl Clone for MatchFilter[src]

impl Debug for MatchFilter[src]

impl Default for MatchFilter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.