#[repr(C)]pub struct _ion_timestamp {
pub precision: u8,
pub tz_offset: i16,
pub year: u16,
pub month: u16,
pub day: u16,
pub hours: u16,
pub minutes: u16,
pub seconds: u16,
pub fraction: decQuad,
}Expand description
Structure to store time information. time_t only has up to second precision, and time zone support is OS dependent. _ion_timestamp uses decimal to store fraction of a second
Fields§
§precision: u8Defined as ION_TS_YEAR, ION_TS_MONTH, ION_TS_DAY, ION_TS_MIN, ION_TS_SEC, ION_TS_FRAC
tz_offset: i16Time zone offset (+/- 24 hours), in term of minutes.
year: u16§month: u16§day: u16§hours: u16§minutes: u16§seconds: u16§fraction: decQuadFraction of a second, e.g: 0.5, 0.01, etc
Implementations§
Source§impl _ion_timestamp
impl _ion_timestamp
Sourcepub fn try_assign_from_iondt(&mut self, ion_dt: &IonDateTime) -> IonCResult<()>
pub fn try_assign_from_iondt(&mut self, ion_dt: &IonDateTime) -> IonCResult<()>
Converts the given IonDateTime into this ION_TIMESTAMP.
Sourcepub fn try_to_iondt(&mut self) -> IonCResult<IonDateTime>
pub fn try_to_iondt(&mut self) -> IonCResult<IonDateTime>
Converts this ION_TIMESTAMP into a IonDateTime.
Note that this borrows mutably, because all of the underlying
ion_timestamp_* functions require a mutable pointer, but this operation
does not actually change the value.
Trait Implementations§
Source§impl Clone for _ion_timestamp
impl Clone for _ion_timestamp
Source§fn clone(&self) -> _ion_timestamp
fn clone(&self) -> _ion_timestamp
Returns a copy 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 Default for _ion_timestamp
impl Default for _ion_timestamp
impl Copy for _ion_timestamp
Auto Trait Implementations§
impl Freeze for _ion_timestamp
impl RefUnwindSafe for _ion_timestamp
impl Send for _ion_timestamp
impl Sync for _ion_timestamp
impl Unpin for _ion_timestamp
impl UnwindSafe for _ion_timestamp
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