Struct glean_core::metrics::Datetime
source · pub struct Datetime {
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,
}
Expand description
Representation of a date, time and timezone.
Fields§
§year: i32
The year, e.g. 2021.
month: u32
The month, 1=January.
day: u32
The day of the month.
hour: u32
The hour. 0-23
minute: u32
The minute. 0-59.
second: u32
The second. 0-60.
nanosecond: u32
The nanosecond part of the time.
offset_seconds: i32
The timezone offset from UTC in seconds. Negative for west, positive for east of UTC.
Trait Implementations§
source§impl From<DateTime<FixedOffset>> for Datetime
impl From<DateTime<FixedOffset>> for Datetime
source§fn from(dt: DateTime<FixedOffset>) -> Self
fn from(dt: DateTime<FixedOffset>) -> Self
Converts to this type from the input type.
source§impl PartialEq for Datetime
impl PartialEq for Datetime
impl Eq for Datetime
impl StructuralEq for Datetime
impl StructuralPartialEq for Datetime
Auto Trait Implementations§
impl RefUnwindSafe for Datetime
impl Send for Datetime
impl Sync for Datetime
impl Unpin for Datetime
impl UnwindSafe for Datetime
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more