pub struct BACnetDateRange {
pub start_date: Date,
pub end_date: Date,
}Expand description
BACnet date range: a SEQUENCE of start and end Date values.
On the wire each Date is application-tagged; the codec is
bacnet_encoding::constructed::{encode_date_range, decode_date_range}.
An unspecified start or end date leaves that side of the range open.
Fields§
§start_date: DateThe start of the date range (inclusive).
end_date: DateThe end of the date range (inclusive).
Implementations§
Source§impl BACnetDateRange
impl BACnetDateRange
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Whether both dates are allowed endpoints: wholly unspecified, or a specific date (year, month and day naming a real day, with no special values). The weekday octet may be unspecified or disagree with the date, since it never changes which day the endpoint names.
Sourcepub fn contains(&self, day: SpecificDate) -> bool
pub fn contains(&self, day: SpecificDate) -> bool
Whether day falls within the range, both ends included; an
unspecified end is open. A range with an invalid endpoint (see
is_valid) contains no day, and so does one whose
start is after its end.