Struct gapi_grpc::google::actions::type::DateRange[][src]

pub struct DateRange {
    pub start: Option<Date>,
    pub end: Option<Date>,
}

Represents a range based on whole or partial calendar dates, e.g. the duration of a hotel reservation or the Common Era. This can represent:

While [google.type.Date][google.type.Date] allows zero years, DateRange does not. Year must always be non-zero.

End cannot be chronologically before start. For example, if start has year 2000, end cannot have year 1999.

When both set, start and end must have exactly the same precision. That is, they must have the same fields populated with non-zero values. For example, if start specifies only year and month, then end must also specify only year and month (but not day).

The date range is inclusive. That is, the dates specified by start and end are part of the date range. For example, the date January 1, 2000 falls within any date with start or end equal to January 1, 2000. When determining whether a date is inside a date range, the date should only be compared to start and end when those values are set.

When a date and date range are specified to different degrees of precision, the rules for evaluating whether that date is inside the date range are as follows:

The semantics of start and end are the same as those of [google.type.Date][google.type.Date], except that year must always be non-zero in DateRange.

Fields

start: Option<Date>

Date at which the date range begins. If unset, the date range has no beginning bound.

end: Option<Date>

Date at which the date range ends. If unset, the date range has no ending bound.

Trait Implementations

impl Clone for DateRange[src]

impl Debug for DateRange[src]

impl Default for DateRange[src]

impl Message for DateRange[src]

impl PartialEq<DateRange> for DateRange[src]

impl StructuralPartialEq for DateRange[src]

Auto Trait Implementations

impl RefUnwindSafe for DateRange

impl Send for DateRange

impl Sync for DateRange

impl Unpin for DateRange

impl UnwindSafe for DateRange

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]