Struct ion_c_sys::_ion_timestamp[][src]

#[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: 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: u16month: u16day: u16hours: u16minutes: u16seconds: u16fraction: decQuad

Fraction of a second, e.g: 0.5, 0.01, etc

Implementations

Converts the given IonDateTime into this ION_TIMESTAMP.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.