Struct google_api_proto::google::maps::places::v1::place::OpeningHours
source · pub struct OpeningHours {
pub open_now: Option<bool>,
pub periods: Vec<Period>,
pub weekday_descriptions: Vec<String>,
pub secondary_hours_type: i32,
pub special_days: Vec<SpecialDay>,
}
Expand description
Information about business hour of the place.
Fields§
§open_now: Option<bool>
Is this place open right now? Always present unless we lack time-of-day or timezone data for these opening hours.
periods: Vec<Period>
The periods that this place is open during the week. The periods are in chronological order, starting with Sunday in the place-local timezone. An empty (but not absent) value indicates a place that is never open, e.g. because it is closed temporarily for renovations.
weekday_descriptions: Vec<String>
Localized strings describing the opening hours of this place, one string for each day of the week. Will be empty if the hours are unknown or could not be converted to localized text. Example: “Sun: 18:00–06:00”
secondary_hours_type: i32
A type string used to identify the type of secondary hours.
special_days: Vec<SpecialDay>
Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, e.g. Christmas day. Set for current_opening_hours and current_secondary_opening_hours if there are exceptional hours.
Implementations§
source§impl OpeningHours
impl OpeningHours
sourcepub fn open_now(&self) -> bool
pub fn open_now(&self) -> bool
Returns the value of open_now
, or the default value if open_now
is unset.
sourcepub fn secondary_hours_type(&self) -> SecondaryHoursType
pub fn secondary_hours_type(&self) -> SecondaryHoursType
Returns the enum value of secondary_hours_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_secondary_hours_type(&mut self, value: SecondaryHoursType)
pub fn set_secondary_hours_type(&mut self, value: SecondaryHoursType)
Sets secondary_hours_type
to the provided enum value.
Trait Implementations§
source§impl Clone for OpeningHours
impl Clone for OpeningHours
source§fn clone(&self) -> OpeningHours
fn clone(&self) -> OpeningHours
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OpeningHours
impl Debug for OpeningHours
source§impl Default for OpeningHours
impl Default for OpeningHours
source§impl Message for OpeningHours
impl Message for OpeningHours
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for OpeningHours
impl PartialEq for OpeningHours
source§fn eq(&self, other: &OpeningHours) -> bool
fn eq(&self, other: &OpeningHours) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for OpeningHours
Auto Trait Implementations§
impl Freeze for OpeningHours
impl RefUnwindSafe for OpeningHours
impl Send for OpeningHours
impl Sync for OpeningHours
impl Unpin for OpeningHours
impl UnwindSafe for OpeningHours
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request