[][src]Struct toornament::Tournament

pub struct Tournament {
    pub id: Option<TournamentId>,
    pub discipline: DisciplineId,
    pub name: String,
    pub full_name: Option<String>,
    pub status: TournamentStatus,
    pub date_start: Option<Date>,
    pub date_end: Option<Date>,
    pub time_zone: Option<String>,
    pub online: bool,
    pub public: bool,
    pub location: Option<String>,
    pub country: Option<String>,
    pub size: i64,
    pub participant_type: Option<ParticipantType>,
    pub match_type: Option<MatchType>,
    pub organization: Option<String>,
    pub website: Option<String>,
    pub description: Option<String>,
    pub rules: Option<String>,
    pub prize: Option<String>,
    pub team_size_min: Option<i64>,
    pub team_size_max: Option<i64>,
    pub streams: Option<Streams>,
    pub check_in: Option<bool>,
    pub participant_nationality: Option<bool>,
    pub match_format: Option<MatchFormat>,
}

A tournament object.

Fields

id: Option<TournamentId>

An hexadecimal unique identifier for this tournament. Example: "5608fd12140ba061298b4569"

discipline: DisciplineId

This string is a unique identifier of a discipline. Example: "my_discipline"

name: String

Name of a tournament (maximum 30 characeters). Example: "My Weekly Tournament"

full_name: Option<String>

Complete name of this tournament (maximum 80 characters). Example: "My Weekly Tournament - Long title"

status: TournamentStatus

Status of the tournament. Possible values: setup, running, completed

date_start: Option<Date>

Starting date of the tournament. This value uses the ISO 8601 date containing only the date section. Example: "2015-09-06"

date_end: Option<Date>

Ending date of the tournament. This value uses the ISO 8601 date containing only the date section. Example: "2015-09-07"

time_zone: Option<String>

Time zone of the tournament. This value is represented using the IANA tz database. Example: "America/Sao_Paulo"

online: bool

Whether the tournament is played on internet or not. Example: true

public: bool

Whether the tournament is public or private. Example: true

location: Option<String>

Location (city, address, place of interest) of the tournament. Example: "London"

country: Option<String>

Country of the tournament. This value uses the ISO 3166-1 alpha-2 country code. Example: "UK"

size: i64

Size of a tournament. Represents the expected number of participants it'll be able to manage. Example: 16

participant_type: Option<ParticipantType>

Type of participants who plays in the tournament. Possible values: team, single

match_type: Option<MatchType>

Type of matches played in the tournament. Possible values: duel, ffa

organization: Option<String>

Tournament organizer: individual, group, association or company. Example: "Avery Bullock"

website: Option<String>

URL of the website Example: "http://www.toornament.com"

description: Option<String>

User-defined description of the tournament (maximum 1,500 characters). Example: "My description \n on multiple lines"

rules: Option<String>

User-defined rules of the tournament (maximum 10,000 characters). Example: "My rules \n on multiple lines"

prize: Option<String>

User-defined description of the tournament prizes (maximum 1,500 characters). Example: "1 - 10,000$ \n 2 - 5,000$"

team_size_min: Option<i64>

(Optional) If the "participant type" value in this tournament is 'team', specify the smallest and the largest possible team sizes.

team_size_max: Option<i64>

(Optional) If the "participant type" value in this tournament is 'team', specify the smallest and the largest possible team sizes.

streams: Option<Streams>

(Optional) A list of streams

check_in: Option<bool>

Enable or disable the participant check-in in the tournament. Example: true

participant_nationality: Option<bool>

Enable or disable the participant flag in the tournament. Example: true

match_format: Option<MatchFormat>

Define the default match format for every matches in the tournament. Possible values: none, one, home_away, bo3, bo5, bo7, bo9, bo11

Methods

impl Tournament[src]

pub fn new<S: Into<String>>(
    id: Option<TournamentId>,
    discipline: DisciplineId,
    name: S,
    status: TournamentStatus,
    online: bool,
    public: bool,
    size: i64
) -> Tournament
[src]

Creates new Tournament object.

pub fn create<S: Into<String>>(
    discipline: DisciplineId,
    name: S,
    size: i64,
    participant_type: ParticipantType
) -> Tournament
[src]

A method which creates Tournament object for creation (Toornament::edit_tournament) purposes.

pub fn id(self, id: Option<TournamentId>) -> Self[src]

A builder method for $field with $field_type type.

pub fn discipline(self, discipline: DisciplineId) -> Self[src]

A builder method for $field with $field_type type.

pub fn name<S: Into<String>>(self, name: S) -> Self[src]

A builder method for $field with String type.

pub fn full_name(self, full_name: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn status(self, status: TournamentStatus) -> Self[src]

A builder method for $field with $field_type type.

pub fn date_start(self, date_start: Option<Date>) -> Self[src]

A builder method for $field with $field_type type.

pub fn date_end(self, date_end: Option<Date>) -> Self[src]

A builder method for $field with $field_type type.

pub fn time_zone(self, time_zone: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

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

A builder method for $field with $field_type type.

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

A builder method for $field with $field_type type.

pub fn location(self, location: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn country(self, country: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

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

A builder method for $field with $field_type type.

pub fn participant_type(self, participant_type: Option<ParticipantType>) -> Self[src]

A builder method for $field with $field_type type.

pub fn match_type(self, match_type: Option<MatchType>) -> Self[src]

A builder method for $field with $field_type type.

pub fn organization(self, organization: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn website(self, website: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn description(self, description: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn rules(self, rules: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn prize(self, prize: Option<String>) -> Self[src]

A builder method for $field with $field_type type.

pub fn team_size_min(self, team_size_min: Option<i64>) -> Self[src]

A builder method for $field with $field_type type.

pub fn team_size_max(self, team_size_max: Option<i64>) -> Self[src]

A builder method for $field with $field_type type.

pub fn streams(self, streams: Option<Streams>) -> Self[src]

A builder method for $field with $field_type type.

pub fn check_in(self, check_in: Option<bool>) -> Self[src]

A builder method for $field with $field_type type.

pub fn participant_nationality(
    self,
    participant_nationality: Option<bool>
) -> Self
[src]

A builder method for $field with $field_type type.

pub fn match_format(self, match_format: Option<MatchFormat>) -> Self[src]

A builder method for $field with $field_type type.

impl Tournament[src]

pub fn iter<'a>(&self, client: &'a Toornament) -> Option<TournamentIter<'a>>[src]

Returns iter for the tournament

pub fn into_iter(self, client: &Toornament) -> Option<TournamentIter>[src]

Converts tournament into an iter

Trait Implementations

impl Clone for Tournament[src]

impl Debug for Tournament[src]

impl<'de> Deserialize<'de> for Tournament[src]

impl Eq for Tournament[src]

impl Ord for Tournament[src]

impl PartialEq<Tournament> for Tournament[src]

impl PartialOrd<Tournament> for Tournament[src]

impl Serialize for Tournament[src]

impl StructuralEq for Tournament[src]

impl StructuralPartialEq for Tournament[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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,