pub struct TeamRecord<H: StandingsHydrations> {Show 23 fields
pub team: H::Team,
pub season: SeasonId,
pub games_played: usize,
pub runs_allowed: usize,
pub runs_scored: usize,
pub is_divisional_champion: bool,
pub is_divisional_leader: bool,
pub has_wildcard: bool,
pub last_updated: NaiveDateTime,
pub streak: Streak,
pub splits: RecordSplits,
pub clinch_kind: ClinchKind,
pub games_back: GamesBack,
pub wild_card_games_back: GamesBack,
pub league_games_back: GamesBack,
pub spring_training_games_back: GamesBack,
pub sport_games_back: GamesBack,
pub division_games_back: GamesBack,
pub conference_games_back: GamesBack,
pub record: Record,
pub divisional_rank: Option<usize>,
pub league_rank: Option<usize>,
pub sport_rank: Option<usize>,
}Expand description
Main bulk of the response; the team’s record and standings information. Lots of stuff here.
Fields§
§team: H::Team§season: SeasonId§games_played: usize§runs_allowed: usize§runs_scored: usize§is_divisional_champion: bool§is_divisional_leader: bool§has_wildcard: bool§last_updated: NaiveDateTime§streak: Streak§splits: RecordSplits§clinch_kind: ClinchKind§games_back: GamesBack§wild_card_games_back: GamesBack§league_games_back: GamesBack§spring_training_games_back: GamesBack§sport_games_back: GamesBack§division_games_back: GamesBack§conference_games_back: GamesBack§record: Record§divisional_rank: Option<usize>§league_rank: Option<usize>§sport_rank: Option<usize>Implementations§
Source§impl<H: StandingsHydrations> TeamRecord<H>
impl<H: StandingsHydrations> TeamRecord<H>
Sourcepub fn expected_win_loss_pct(&self) -> ThreeDecimalPlaceRateStat
pub fn expected_win_loss_pct(&self) -> ThreeDecimalPlaceRateStat
Uses the pythagorean expected win loss pct formula
Sourcepub fn expected_end_of_season_record(&self) -> Record
pub fn expected_end_of_season_record(&self) -> Record
Assumes 162 total games. Recommended to use the other function if available
Sourcepub fn expected_end_of_season_record_with_total_games(
&self,
total_games: usize,
) -> Record
pub fn expected_end_of_season_record_with_total_games( &self, total_games: usize, ) -> Record
Expected record at the end of the season considering the games already played and the expected win loss pct.
Sourcepub fn run_differential(&self) -> isize
pub fn run_differential(&self) -> isize
Net runs scored for the team
Trait Implementations§
Source§impl<H: Clone + StandingsHydrations> Clone for TeamRecord<H>
impl<H: Clone + StandingsHydrations> Clone for TeamRecord<H>
Source§fn clone(&self) -> TeamRecord<H>
fn clone(&self) -> TeamRecord<H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<H: Debug + StandingsHydrations> Debug for TeamRecord<H>
impl<H: Debug + StandingsHydrations> Debug for TeamRecord<H>
Source§impl<H: StandingsHydrations> Deref for TeamRecord<H>
impl<H: StandingsHydrations> Deref for TeamRecord<H>
Source§impl<H: StandingsHydrations> DerefMut for TeamRecord<H>
impl<H: StandingsHydrations> DerefMut for TeamRecord<H>
Source§impl<'de, H> Deserialize<'de> for TeamRecord<H>where
H: StandingsHydrations,
impl<'de, H> Deserialize<'de> for TeamRecord<H>where
H: StandingsHydrations,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<H: PartialEq + StandingsHydrations> PartialEq for TeamRecord<H>
impl<H: PartialEq + StandingsHydrations> PartialEq for TeamRecord<H>
impl<H: StandingsHydrations> StructuralPartialEq for TeamRecord<H>
Auto Trait Implementations§
impl<H> Freeze for TeamRecord<H>
impl<H> RefUnwindSafe for TeamRecord<H>
impl<H> Send for TeamRecord<H>
impl<H> Sync for TeamRecord<H>
impl<H> Unpin for TeamRecord<H>
impl<H> UnsafeUnpin for TeamRecord<H>
impl<H> UnwindSafe for TeamRecord<H>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more