pub struct Team<H: TeamHydrations> {Show 14 fields
pub all_star_status: AllStarStatus,
pub active: bool,
pub season: SeasonId,
pub venue: H::Venue,
pub location_name: Option<String>,
pub first_year_of_play: SeasonId,
pub league: H::League,
pub division: Option<H::Division>,
pub sport: H::Sport,
pub parent_organization: Option<NamedOrganization>,
pub name: TeamName,
pub spring_venue: Option<H::SpringVenue>,
pub spring_league: Option<LeagueId>,
pub extras: H,
/* private fields */
}Expand description
A detailed struct representing a baseball team.
§Examples
Team {
all_star_status: AllStarStatus::Yes,
active: true,
season: 2025,
venue: NamedVenue { name: "Rogers Centre", id: 14 },
location_name: Some("Toronto"),
first_year_of_play: 1977,
league: NamedLeague { name: "American League", id: 103 },
division: Some(NamedDivision { name: "American League East", id: 201 }),
sport: SportId::MLB,
parent_organization: None,
name: TeamName {
team_code: "tor",
file_code: "tor",
abbreviation: "TOR",
team_name: "Blue Jays",
short_name: "Toronto",
franchise_name: "Toronto",
club_name: "Blue Jays",
full_name: "Toronto Blue Jays",
},
spring_venue: Some(VenueId::new(2536)),
spring_league: Some(LeagueId::new(115)),
id: 141,
}Fields§
§all_star_status: AllStarStatus§active: bool§season: SeasonId§venue: H::Venue§location_name: Option<String>§first_year_of_play: SeasonId§league: H::League§division: Option<H::Division>§sport: H::Sport§parent_organization: Option<NamedOrganization>§name: TeamName§spring_venue: Option<H::SpringVenue>§spring_league: Option<LeagueId>§extras: HTrait Implementations§
Source§impl<H: TeamHydrations> Deref for Team<H>
impl<H: TeamHydrations> Deref for Team<H>
Source§impl<H: TeamHydrations> DerefMut for Team<H>
impl<H: TeamHydrations> DerefMut for Team<H>
Source§impl<'de, H> Deserialize<'de> for Team<H>where
H: TeamHydrations,
impl<'de, H> Deserialize<'de> for Team<H>where
H: TeamHydrations,
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: TeamHydrations> PartialEq for Team<H>
impl<H: TeamHydrations> PartialEq for Team<H>
Auto Trait Implementations§
impl<H> Freeze for Team<H>where
<H as TeamHydrations>::Venue: Freeze,
<H as TeamHydrations>::League: Freeze,
<H as TeamHydrations>::Sport: Freeze,
H: Freeze,
<H as TeamHydrations>::Division: Freeze,
<H as TeamHydrations>::SpringVenue: Freeze,
impl<H> RefUnwindSafe for Team<H>where
<H as TeamHydrations>::Venue: RefUnwindSafe,
<H as TeamHydrations>::League: RefUnwindSafe,
<H as TeamHydrations>::Sport: RefUnwindSafe,
H: RefUnwindSafe,
<H as TeamHydrations>::Division: RefUnwindSafe,
<H as TeamHydrations>::SpringVenue: RefUnwindSafe,
impl<H> Send for Team<H>where
<H as TeamHydrations>::Venue: Send,
<H as TeamHydrations>::League: Send,
<H as TeamHydrations>::Sport: Send,
H: Send,
<H as TeamHydrations>::Division: Send,
<H as TeamHydrations>::SpringVenue: Send,
impl<H> Sync for Team<H>where
<H as TeamHydrations>::Venue: Sync,
<H as TeamHydrations>::League: Sync,
<H as TeamHydrations>::Sport: Sync,
H: Sync,
<H as TeamHydrations>::Division: Sync,
<H as TeamHydrations>::SpringVenue: Sync,
impl<H> Unpin for Team<H>where
<H as TeamHydrations>::Venue: Unpin,
<H as TeamHydrations>::League: Unpin,
<H as TeamHydrations>::Sport: Unpin,
H: Unpin,
<H as TeamHydrations>::Division: Unpin,
<H as TeamHydrations>::SpringVenue: Unpin,
impl<H> UnsafeUnpin for Team<H>where
<H as TeamHydrations>::Venue: UnsafeUnpin,
<H as TeamHydrations>::League: UnsafeUnpin,
<H as TeamHydrations>::Sport: UnsafeUnpin,
H: UnsafeUnpin,
<H as TeamHydrations>::Division: UnsafeUnpin,
<H as TeamHydrations>::SpringVenue: UnsafeUnpin,
impl<H> UnwindSafe for Team<H>where
<H as TeamHydrations>::Venue: UnwindSafe,
<H as TeamHydrations>::League: UnwindSafe,
<H as TeamHydrations>::Sport: UnwindSafe,
H: UnwindSafe,
<H as TeamHydrations>::Division: UnwindSafe,
<H as TeamHydrations>::SpringVenue: UnwindSafe,
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