[][src]Struct rustoa::Team

pub struct Team {
    pub team_number: u32,
    // some fields omitted
}

A struct used to access an FTC team.

Do not create this struct yourself. Instead use your Client instance.

Fields

team_number: u32

Implementations

impl Team[src]

pub fn wins(&self) -> u32[src]

The total amount of times the team has won a match.

This method takes no arguments.

It returns a u32 integer.

pub fn losses(&self) -> u32[src]

The total amount of times the team has lost a match.

This method takes no arguments.

It returns a u32 integer.

pub fn ties(&self) -> u32[src]

The amount of times the team has tied a match.

This method takes no arguments.

It returns a u32 integer.

pub fn properties(&self) -> HashMap<String, String, RandomState>[src]

Basic information of the team.

This method takes no arguments.

It returns a HashMap<String, String>.

Panics

This method can panic in the following ways:

  • The HTTP request was not successful
  • The data received from the API was invalid JSON
  • The data received was in the wrong format

pub fn season_wins(&self, season: Season) -> f64[src]

The amount of times the team has won in a particular season

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn season_losses(&self, season: Season) -> f64[src]

The amount of times the team has lost in a particular season

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn season_ties(&self, season: Season) -> f64[src]

The amount of times the team has tied a match in a particular season

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn opr(&self, season: Season) -> f64[src]

OPR stands for Offensive Power Rating.

This is a system that attempts to deduce the average point contribution of a team to an alliance.

Penalties are also factored in.

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn np_opr(&self, season: Season) -> f64[src]

NP_OPR is the OPR without penalties.

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn ranking_points(&self, season: Season) -> f64[src]

Ranking points are the number of points scored by the losing alliance in a qualification match. If you win the match, then the RP awarded to you is the score of your opponent alliance (which lost). If you lose the match, then the RP awarded to you is your own alliance’s score.

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn qualifying_points(&self, season: Season) -> f64[src]

Winning teams of a qualifying match each receive 2 QP. Losing teams receive 0. If a match ends in a tie, all four teams receive 1 QP.

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn tiebreaker_points(&self, season: Season) -> f64[src]

Tiebreaker points are the pre-penalty score of the losing alliance for each match. This method returns the total tiebreaker points of a team in one season.

Arguments

Panics

This method will panic if the data sent by the API was in the wrong format.

pub fn events(&self, season: Season) -> HashMap<String, Event, RandomState>[src]

Auto Trait Implementations

impl RefUnwindSafe for Team

impl Send for Team

impl Sync for Team

impl Unpin for Team

impl UnwindSafe for Team

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.