[−][src]Struct ion_c_sys::_ion_timestamp
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: u8
Defined as ION_TS_YEAR, ION_TS_MONTH, ION_TS_DAY, ION_TS_MIN, ION_TS_SEC, ION_TS_FRAC
tz_offset: i16
Time zone offset (+/- 24 hours), in term of minutes.
year: u16
month: u16
day: u16
hours: u16
minutes: u16
seconds: u16
fraction: decQuad
Fraction of a second, e.g: 0.5, 0.01, etc
Implementations
impl _ion_timestamp
[src]
pub fn try_assign_from_iondt(&mut self, ion_dt: &IonDateTime) -> IonCResult<()>
[src]
Converts the given IonDateTime
into this ION_TIMESTAMP
.
pub fn try_to_iondt(&mut self) -> IonCResult<IonDateTime>
[src]
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
impl Clone for _ion_timestamp
[src]
fn clone(&self) -> _ion_timestamp
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for _ion_timestamp
[src]
impl Default for _ion_timestamp
[src]
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,