Struct google_maps::places::place_opening_hours::PlaceOpeningHours
source · pub struct PlaceOpeningHours {
pub open_now: Option<bool>,
pub periods: Option<Vec<PlaceOpeningHoursPeriod>>,
pub special_days: Option<Vec<PlaceSpecialDay>>,
pub secondary_hours_type: Option<SecondaryHoursType>,
pub weekday_text: Option<Vec<String>>,
}
Expand description
An object describing the opening hours of a place.
Fields§
§open_now: Option<bool>
A boolean value indicating if the place is open at the current time.
periods: Option<Vec<PlaceOpeningHoursPeriod>>
An array of opening periods covering seven days, starting from Sunday, in chronological order.
See PlaceOpeningHoursPeriod for more information.
special_days: Option<Vec<PlaceSpecialDay>>
An array of up to seven entries corresponding to the next seven days.
See PlaceSpecialDay for more information.
secondary_hours_type: Option<SecondaryHoursType>
A type string used to identify the type of secondary hours (for example,
DRIVE_THROUGH
, HAPPY_HOUR
, DELIVERY
, TAKEOUT
, KITCHEN
,
BREAKFAST
, LUNCH
, DINNER
, BRUNCH
, PICKUP
, SENIOR_HOURS
). Set
for secondary_opening_hours
only.
weekday_text: Option<Vec<String>>
An array of strings describing in human-readable text the hours of the place.
Implementations§
source§impl PlaceOpeningHours
impl PlaceOpeningHours
A helper function that returns the dates of upcoming special days for a
place. This is meant to be used with the Place.current_opening_hours
field. Using this with the Place.current_opening_hours
will likely just
return None
.
pub fn special_days(&self) -> Option<HashSet<NaiveDate>>
Trait Implementations§
source§impl Clone for PlaceOpeningHours
impl Clone for PlaceOpeningHours
source§fn clone(&self) -> PlaceOpeningHours
fn clone(&self) -> PlaceOpeningHours
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PlaceOpeningHours
impl Debug for PlaceOpeningHours
source§impl<'de> Deserialize<'de> for PlaceOpeningHours
impl<'de> Deserialize<'de> for PlaceOpeningHours
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>,
source§impl FromStr for PlaceOpeningHours
impl FromStr for PlaceOpeningHours
source§impl Hash for PlaceOpeningHours
impl Hash for PlaceOpeningHours
source§impl PartialEq<PlaceOpeningHours> for PlaceOpeningHours
impl PartialEq<PlaceOpeningHours> for PlaceOpeningHours
source§fn eq(&self, other: &PlaceOpeningHours) -> bool
fn eq(&self, other: &PlaceOpeningHours) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PlaceOpeningHours
impl Serialize for PlaceOpeningHours
impl Eq for PlaceOpeningHours
impl StructuralEq for PlaceOpeningHours
impl StructuralPartialEq for PlaceOpeningHours
Auto Trait Implementations§
impl RefUnwindSafe for PlaceOpeningHours
impl Send for PlaceOpeningHours
impl Sync for PlaceOpeningHours
impl Unpin for PlaceOpeningHours
impl UnwindSafe for PlaceOpeningHours
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.