Type Definition ion_c_sys::ION_TIMESTAMP
source · [−]pub type ION_TIMESTAMP = _ion_timestamp;
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
Implementations
sourceimpl 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.