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
.§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 more§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.Source§impl ValueTypeMarker for CivilTime
impl ValueTypeMarker for CivilTime
impl Persistable for CivilTime
impl StructuralPartialEq for CivilTime
Auto Trait Implementations§
impl Freeze for CivilTime
impl RefUnwindSafe for CivilTime
impl Send for CivilTime
impl Sync for CivilTime
impl Unpin for CivilTime
impl UnwindSafe for CivilTime
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)