pub fn seconds_from_hms(hour: u8, minute: u8, second: u8) -> Result<u32, Error> {
    if hour > 23 || minute > 59 || second > 59 {
        Err(Error::BadDERTime)
    } else {
        Ok((u32::from(hour) * 60 + u32::from(minute)) * 60 + u32::from(second))
    }
}
/// Convert an (hour, minute, second) tuple to a number of seconds since
/// midnight or an error.
Convert an (hour, minute, second) tuple to a number of seconds since
midnight or an error.
Convert an ( hour minute second ) tuple to a number of seconds since midnight or an error .
pub fn seconds_from_hms(hour: u8, minute: u8, second: u8) -> Result<u32, Error> {
    if hour > 23 || minute > 59 || second > 59 {
        Err(Error::BadDERTime)
    } else {
        Ok((u32::from(hour) * 60 + u32::from(minute)) * 60 + u32::from(second))
    }
}
pub fn seconds_from_hms ( hour : u8 , minute : u8 , second : u8 ) -> Result < u32 , Error > { if hour > 23 || minute > 59 || second > 59 { Err ( Error :: BadDERTime ) } else { Ok ( ( u32 :: from ( hour ) * 60 + u32 :: from ( minute ) ) * 60 + u32 :: from ( second ) ) } }
Convert an (hour, minute, second) tuple to a number of seconds since
midnight or an error.
Convert an ( hour minute second ) tuple to a number of seconds since midnight or an error .
hour
u8
minute
u8
second
u8
hour
u8
minute
u8
second
u8