pub struct Season {
pub id: SeasonId,
pub has_wildcard: bool,
pub preseason: NaiveDateRange,
pub spring: Option<NaiveDateRange>,
pub season: NaiveDateRange,
pub regular_season: NaiveDateRange,
pub first_half_end: Option<NaiveDate>,
pub all_star: Option<NaiveDate>,
pub second_half_start: Option<NaiveDate>,
pub postseason: Option<NaiveDateRange>,
pub offseason: NaiveDateRange,
pub qualification_multipliers: Option<QualificationMultipliers>,
}Expand description
A season and it’s info - dependent on SportId.
Stores multiple date ranges for different parts of the season (spring training, postseason, etc)
These fields are arranged in a chronological order but the specification makes no guarantees that this order remain consistent.
Fields§
§id: SeasonId§has_wildcard: boolIf the season has a wildcard system
preseason: NaiveDateRangePreseason date range
spring: Option<NaiveDateRange>Spring Training date range
season: NaiveDateRangeFull Season date range
regular_season: NaiveDateRangeRegular Season date range
first_half_end: Option<NaiveDate>End of the first half of the season (if the season halves are defined)
all_star: Option<NaiveDate>When the ASG is
second_half_start: Option<NaiveDate>Start of the second half of the season (if the season halves are defined)
postseason: Option<NaiveDateRange>When the postseason happens
offseason: NaiveDateRangeWhen the offseason is active (different from preseason)
qualification_multipliers: Option<QualificationMultipliers>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Season
impl<'de> Deserialize<'de> for Season
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
impl StructuralPartialEq for Season
Auto Trait Implementations§
impl Freeze for Season
impl RefUnwindSafe for Season
impl Send for Season
impl Sync for Season
impl Unpin for Season
impl UnsafeUnpin for Season
impl UnwindSafe for Season
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