Skip to main content

venue_hydrations

Macro venue_hydrations 

Source
macro_rules! venue_hydrations {
    (@ inline_structs [$field:ident $(: $value: path)? $(, $($tt:tt)*)?] $vis:vis struct $name:ident { $($field_tt:tt)* }) => { ... };
    (@ inline_structs [$(,)?] $vis:vis struct $name:ident { $($field_tt:tt)* }) => { ... };
    (@ actual $vis:vis struct $name:ident {
		$(location $location_comma:tt)?
		$(timezone $timezone_comma:tt)?
		$(field_info $field_info_comma:tt)?
		$(external_references $external_references_comma:tt)?
		$(tracking_system $tracking_system_comma:tt)?
	}) => { ... };
    ($vis:vis struct $name:ident { $($tt:tt)* }) => { ... };
}
Expand description

Creates hydrations for a venue

§Examples

use mlb_api::venue_hydrations;
 
venue_hydrations! {
    pub struct TestHydrations {
        location,
        timezone,
        field_info,
        external_references,
        tracking_system,
    }
}

let [venue]: [Venue<TestHydrations>; 1] = VenuesRequest::<TestHydrations>::builder().venue_ids([14.into()]).build_and_get().await.unwrap().venues.try_into().unwrap();

§Venue Hydrations

NameType
locationLocation
timezoneTimeZoneData
field_infoFieldInfo
external_referencesVec<ExternalReference>
tracking_systemTrackingSystem