pub struct LoraDateTime {
pub year: i32,
pub month: u32,
pub day: u32,
pub hour: u32,
pub minute: u32,
pub second: u32,
pub nanosecond: u32,
pub offset_seconds: i32,
}Fields§
§year: i32§month: u32§day: u32§hour: u32§minute: u32§second: u32§nanosecond: u32§offset_seconds: i32Implementations§
Source§impl LoraDateTime
impl LoraDateTime
pub fn new( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, nanosecond: u32, offset_seconds: i32, ) -> Result<Self, String>
pub fn parse(s: &str) -> Result<Self, String>
pub fn now() -> Self
Sourcepub fn to_epoch_millis(&self) -> i64
pub fn to_epoch_millis(&self) -> i64
Milliseconds since Unix epoch, normalized to UTC.
pub fn add_duration(&self, dur: &LoraDuration) -> Self
pub fn truncate_to_day(&self) -> Self
pub fn truncate_to_hour(&self) -> Self
pub fn date(&self) -> LoraDate
Trait Implementations§
Source§impl Clone for LoraDateTime
impl Clone for LoraDateTime
Source§fn clone(&self) -> LoraDateTime
fn clone(&self) -> LoraDateTime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoraDateTime
impl Debug for LoraDateTime
Source§impl Display for LoraDateTime
impl Display for LoraDateTime
Source§impl Ord for LoraDateTime
impl Ord for LoraDateTime
Source§impl PartialEq for LoraDateTime
impl PartialEq for LoraDateTime
Source§impl PartialOrd for LoraDateTime
impl PartialOrd for LoraDateTime
impl Eq for LoraDateTime
impl StructuralPartialEq for LoraDateTime
Auto Trait Implementations§
impl Freeze for LoraDateTime
impl RefUnwindSafe for LoraDateTime
impl Send for LoraDateTime
impl Sync for LoraDateTime
impl Unpin for LoraDateTime
impl UnsafeUnpin for LoraDateTime
impl UnwindSafe for LoraDateTime
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