[−][src]Struct toornament::Discipline
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]
id: DisciplineId,
name: S,
short_name: S,
full_name: S,
copyrights: S
) -> Discipline
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]
self,
additional_fields: Option<AdditionalFields>
) -> Self
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]
fn clone(&self) -> Discipline
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Discipline
[src]
impl Default for Discipline
[src]
fn default() -> Discipline
[src]
impl<'de> Deserialize<'de> for Discipline
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Discipline
[src]
Auto Trait Implementations
impl RefUnwindSafe for Discipline
impl Send for Discipline
impl Sync for Discipline
impl Unpin for Discipline
impl UnwindSafe for Discipline
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<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>,