[−][src]Struct toornament::Tournament
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]
id: Option<TournamentId>,
discipline: DisciplineId,
name: S,
status: TournamentStatus,
online: bool,
public: bool,
size: i64
) -> Tournament
Creates new Tournament
object.
pub fn create<S: Into<String>>(
discipline: DisciplineId,
name: S,
size: i64,
participant_type: ParticipantType
) -> Tournament
[src]
discipline: DisciplineId,
name: S,
size: i64,
participant_type: ParticipantType
) -> Tournament
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]
self,
participant_nationality: Option<bool>
) -> Self
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]
fn clone(&self) -> Tournament
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Tournament
[src]
impl<'de> Deserialize<'de> for Tournament
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Tournament
[src]
impl Ord for Tournament
[src]
fn cmp(&self, other: &Tournament) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Tournament> for Tournament
[src]
fn eq(&self, other: &Tournament) -> bool
[src]
fn ne(&self, other: &Tournament) -> bool
[src]
impl PartialOrd<Tournament> for Tournament
[src]
fn partial_cmp(&self, other: &Tournament) -> Option<Ordering>
[src]
fn lt(&self, other: &Tournament) -> bool
[src]
fn le(&self, other: &Tournament) -> bool
[src]
fn gt(&self, other: &Tournament) -> bool
[src]
fn ge(&self, other: &Tournament) -> bool
[src]
impl Serialize for Tournament
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Tournament
[src]
impl StructuralPartialEq for Tournament
[src]
Auto Trait Implementations
impl RefUnwindSafe for Tournament
impl Send for Tournament
impl Sync for Tournament
impl Unpin for Tournament
impl UnwindSafe for Tournament
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,