[−][src]Struct rustoa::Team
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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
season: Season
- A rustoaSeason
object.
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]
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,