Struct google_api_proto::google::actions::type::DateTimeRange
source · pub struct DateTimeRange {
pub start: Option<DateTime>,
pub end: Option<DateTime>,
}
Expand description
Represents a date and time range. This can represent:
- A range between points in time with time zone or offset, e.g. the duration of a flight which starts in the “America/New_York” time zone and ends in the “Australia/Sydney” time zone
- A range between points in time without time zone/offset info, e.g. an appointment in local time
- A range starting at a specific date and time, e.g. the range of time which can be measured in milliseconds since the Unix epoch (period starting with 1970-01-01T00:00:00Z)
- A range ending at a specific date and time, e.g. range of time before a deadline
When considering whether a DateTime falls within a DateTimeRange, the start of the range is inclusive and the end is exclusive.
While [google.type.DateTime][google.type.DateTime] allows zero years, DateTimeRange does not. Year must always be non-zero.
When both start and end are set, either both or neither must have a time_offset. When set, time_offset can be specified by either utc_offset or time_zone and must match for start and end, that is if start has utc_offset set then end must also have utc_offset set. The values of utc_offset or time_zone need not be the same for start and end.
When both start and end are set, start must be chronologically less than or equal to end. When start and end are equal, the range is empty.
The semantics of start and end are the same as those of [google.type.DateTime][google.type.DateTime].
Fields§
§start: Option<DateTime>
DateTime at which the date range begins. If unset, the range has no beginning bound.
end: Option<DateTime>
DateTime at which the date range ends. If unset, the range has no ending bound.
Trait Implementations§
source§impl Clone for DateTimeRange
impl Clone for DateTimeRange
source§fn clone(&self) -> DateTimeRange
fn clone(&self) -> DateTimeRange
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DateTimeRange
impl Debug for DateTimeRange
source§impl Default for DateTimeRange
impl Default for DateTimeRange
source§impl Message for DateTimeRange
impl Message for DateTimeRange
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 DateTimeRange
impl PartialEq for DateTimeRange
source§fn eq(&self, other: &DateTimeRange) -> bool
fn eq(&self, other: &DateTimeRange) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DateTimeRange
Auto Trait Implementations§
impl Freeze for DateTimeRange
impl RefUnwindSafe for DateTimeRange
impl Send for DateTimeRange
impl Sync for DateTimeRange
impl Unpin for DateTimeRange
impl UnwindSafe for DateTimeRange
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