pub struct SpecialHourPeriod {
    pub close_time: Option<String>,
    pub end_date: Option<Date>,
    pub is_closed: Option<bool>,
    pub open_time: Option<String>,
    pub start_date: Option<Date>,
}
Expand description

Represents a single time period when a location’s operational hours differ from its normal business hours. A special hour period must represent a range of less than 24 hours. The open_time and start_date must predate the close_time and end_date. The close_time and end_date can extend to 11:59 a.m. on the day after the specified start_date. For example, the following inputs are valid:

start_date=2015-11-23, open_time=08:00, close_time=18:00
start_date=2015-11-23, end_date=2015-11-23, open_time=08:00,
close_time=18:00 start_date=2015-11-23, end_date=2015-11-24,
open_time=13:00, close_time=11:59

The following inputs are not valid:

start_date=2015-11-23, open_time=13:00, close_time=11:59
start_date=2015-11-23, end_date=2015-11-24, open_time=13:00,
close_time=12:00 start_date=2015-11-23, end_date=2015-11-25,
open_time=08:00, close_time=18:00

This type is not used in any activity, and only used as part of another schema.

Fields§

§close_time: Option<String>

The wall time on end_date when a location closes, expressed in 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if is_closed is false.

§end_date: Option<Date>

The calendar date this special hour period ends on. If end_date field is not set, default to the date specified in start_date. If set, this field must be equal to or at most 1 day after start_date.

§is_closed: Option<bool>

If true, end_date, open_time, and close_time are ignored, and the date specified in start_date is treated as the location being closed for the entire day.

§open_time: Option<String>

The wall time on start_date when a location opens, expressed in 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if is_closed is false.

§start_date: Option<Date>

The calendar date this special hour period starts on.

Trait Implementations§

source§

impl Clone for SpecialHourPeriod

source§

fn clone(&self) -> SpecialHourPeriod

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SpecialHourPeriod

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SpecialHourPeriod

source§

fn default() -> SpecialHourPeriod

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SpecialHourPeriod

source§

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 Serialize for SpecialHourPeriod

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Part for SpecialHourPeriod

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,