Struct toornament::Tournament
[−]
[src]
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]
fn new<S: Into<String>>(
id: Option<TournamentId>,
discipline: DisciplineId,
name: S,
status: TournamentStatus,
online: bool,
public: bool,
size: i64
) -> Tournament
id: Option<TournamentId>,
discipline: DisciplineId,
name: S,
status: TournamentStatus,
online: bool,
public: bool,
size: i64
) -> Tournament
Creates new Discipline
object.
fn id<'a>(&'a mut self, id: Option<TournamentId>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn discipline<'a>(&'a mut self, discipline: DisciplineId) -> &'a mut Self
A builder method for $field with $field_type
type.
fn name<'a, S: Into<String>>(&'a mut self, name: S) -> &'a mut Self
A builder method for $field with String
type.
fn full_name<'a>(&'a mut self, full_name: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn status<'a>(&'a mut self, status: TournamentStatus) -> &'a mut Self
A builder method for $field with $field_type
type.
fn date_start<'a>(&'a mut self, date_start: Option<Date>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn date_end<'a>(&'a mut self, date_end: Option<Date>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn time_zone<'a>(&'a mut self, time_zone: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn online<'a>(&'a mut self, online: bool) -> &'a mut Self
A builder method for $field with $field_type
type.
fn public<'a>(&'a mut self, public: bool) -> &'a mut Self
A builder method for $field with $field_type
type.
fn location<'a>(&'a mut self, location: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn country<'a>(&'a mut self, country: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn size<'a>(&'a mut self, size: i64) -> &'a mut Self
A builder method for $field with $field_type
type.
fn participant_type<'a>(
&'a mut self,
participant_type: Option<ParticipantType>
) -> &'a mut Self
&'a mut self,
participant_type: Option<ParticipantType>
) -> &'a mut Self
A builder method for $field with $field_type
type.
fn match_type<'a>(&'a mut self, match_type: Option<MatchType>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn organization<'a>(&'a mut self, organization: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn website<'a>(&'a mut self, website: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn rules<'a>(&'a mut self, rules: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn prize<'a>(&'a mut self, prize: Option<String>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn team_size_min<'a>(&'a mut self, team_size_min: Option<i64>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn team_size_max<'a>(&'a mut self, team_size_max: Option<i64>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn streams<'a>(&'a mut self, streams: Option<Streams>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn check_in<'a>(&'a mut self, check_in: Option<bool>) -> &'a mut Self
A builder method for $field with $field_type
type.
fn participant_nationality<'a>(
&'a mut self,
participant_nationality: Option<bool>
) -> &'a mut Self
&'a mut self,
participant_nationality: Option<bool>
) -> &'a mut Self
A builder method for $field with $field_type
type.
fn match_format<'a>(
&'a mut self,
match_format: Option<MatchFormat>
) -> &'a mut Self
&'a mut self,
match_format: Option<MatchFormat>
) -> &'a mut Self
A builder method for $field with $field_type
type.
Trait Implementations
impl Clone for Tournament
[src]
fn clone(&self) -> Tournament
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Tournament
[src]
impl Eq for Tournament
[src]
impl Ord for Tournament
[src]
fn cmp(&self, __arg_0: &Tournament) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialEq for Tournament
[src]
fn eq(&self, __arg_0: &Tournament) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tournament) -> bool
This method tests for !=
.
impl PartialOrd for Tournament
[src]
fn partial_cmp(&self, __arg_0: &Tournament) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Tournament) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Tournament) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Tournament) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Tournament) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more