pub struct Date {
pub year: u8,
pub month: u8,
pub day: u8,
pub day_of_week: u8,
}Expand description
BACnet Date: year, month, day, day-of-week.
- Year: 0-254 relative to 1900 (0xFF = unspecified)
- Month: 1-14 (13=odd, 14=even, 0xFF=unspecified)
- Day: 1-34 (32=last, 33=odd, 34=even, 0xFF=unspecified)
- Day of week: 1=Monday..7=Sunday (0xFF=unspecified)
Fields§
§year: u8Year minus 1900 (0-254, or 0xFF for unspecified).
month: u8Month (1-14, or 0xFF for unspecified).
day: u8Day of month (1-34, or 0xFF for unspecified).
day_of_week: u8Day of week (1=Monday..7=Sunday, or 0xFF for unspecified).
Implementations§
Source§impl Date
impl Date
Sourcepub const UNSPECIFIED: u8 = 0xFF
pub const UNSPECIFIED: u8 = 0xFF
Value indicating “unspecified” for any date field.
Sourcepub fn actual_year(&self) -> Option<u16>
pub fn actual_year(&self) -> Option<u16>
Get the actual year (1900 + year field), or None if unspecified.
Trait Implementations§
impl Copy for Date
impl Eq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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
Mutably borrows from an owned value. Read more