pub struct CivilTime {
pub year: Option<u16>,
pub month: Option<Month>,
pub day: Option<u8>,
pub hour: Option<u8>,
pub minute: Option<u8>,
pub second: Option<u8>,
pub nanos: Option<u64>,
pub weekday: Option<DayOfWeek>,
pub year_day: Option<u16>,
pub time_zone_id: Option<TimeZoneId>,
/* private fields */
}Expand description
Describes a time on a civil calendar (Gregorian), with nanosecond precision. This is roughly
equivalent to the tm struct in time.h in the C standard library, and is intended as a
structured intermediate format for printing or parsing dates.
Fields§
§year: Option<u16>Year, in the closed range [1678, 2262].
month: Option<Month>Month of the year.
day: Option<u8>Day of the month, in the closed range [1, 31].
hour: Option<u8>Hour of the day, in the closed range [0, 23].
minute: Option<u8>Minute of the hour, in the closed range [0, 59].
second: Option<u8>Second of the minute, in the closed range [0, 59].
(Note that Fuchsia does not currently calculate leap seconds when converting dates.)
nanos: Option<u64>Nanosecond, in the closed range [0, 999_999_999].
weekday: Option<DayOfWeek>Day of the week.
year_day: Option<u16>Day of the year, in the closed range [0, 365].
time_zone_id: Option<TimeZoneId>The time zone corresponding to this time. If omitted, the default is UTC.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<CivilTime, D> for CivilTime
impl<D: ResourceDialect> Decode<CivilTime, D> for CivilTime
Source§impl TypeMarker for CivilTime
impl TypeMarker for CivilTime
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.