[][src]Struct toornament::Discipline

pub struct Discipline {
    pub id: DisciplineId,
    pub name: String,
    pub short_name: String,
    pub full_name: String,
    pub copyrights: String,
    pub team_size: Option<TeamSize>,
    pub additional_fields: Option<AdditionalFields>,
}

A game discipline object.

Fields

id: DisciplineId

An identifier for a discipline, can be used in others APIs. Example: "counterstrike_go"

name: String

The official name of the discipline. Example: "Counter-Strike: GO"

short_name: String

The short name of the discipline. Example: "CS:GO"

full_name: String

The complete name of the discipline. Example: "Counter-Strike: Global Offensive"

copyrights: String

The name of the publisher of the discipline or any other right related information about the owner of the discipline. Example: "Valve Software"

team_size: Option<TeamSize>

(Optional) Sets the minimum and maximum of players in a team. Example: (4, 8), where 4 is minimal size of a team in the tournament and 8 is maximal size of a team in the tournament.

additional_fields: Option<AdditionalFields>

(Optional) Additional fields concerning the discipline. Note about the special fields in this API: if the field is mentioned, you must use one of the following values.

Methods

impl Discipline[src]

pub fn new<S: Into<String>>(
    id: DisciplineId,
    name: S,
    short_name: S,
    full_name: S,
    copyrights: S
) -> Discipline
[src]

Creates new Discipline object.

pub fn id(self, id: 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 short_name<S: Into<String>>(self, short_name: S) -> Self[src]

A builder method for $field with String type.

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

A builder method for $field with String type.

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

A builder method for $field with String type.

pub fn team_size(self, team_size: Option<TeamSize>) -> Self[src]

A builder method for $field with $field_type type.

pub fn additional_fields(
    self,
    additional_fields: Option<AdditionalFields>
) -> Self
[src]

A builder method for $field with $field_type type.

impl Discipline[src]

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

Returns iter for the discipline

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

Converts discipline into an iter

Trait Implementations

impl Clone for Discipline[src]

impl Debug for Discipline[src]

impl Default for Discipline[src]

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

impl Serialize for Discipline[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<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.