#[repr(C)]pub struct TimePickerState {
pub hour: u32,
pub minute: u32,
pub is_pm: bool,
pub is_24h: bool,
}Expand description
State of a TimePicker.
Fields§
§hour: u32The displayed hour: 0..=23 when Self::is_24h, else 1..=12.
minute: u32The minute, 0..=59.
is_pm: boolPM flag — only meaningful in 12-hour mode (ignored when is_24h).
is_24h: booltrue = 24-hour display (no AM/PM), false = 12-hour display + AM/PM.
Implementations§
Source§impl TimePickerState
impl TimePickerState
Sourcepub const fn canonical_hour(&self) -> u32
pub const fn canonical_hour(&self) -> u32
Returns the hour in canonical 24-hour form (0..=23), accounting for the
AM/PM flag in 12-hour mode (12 AM -> 0, 12 PM -> 12).
Trait Implementations§
Source§impl Clone for TimePickerState
impl Clone for TimePickerState
Source§fn clone(&self) -> TimePickerState
fn clone(&self) -> TimePickerState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TimePickerState
Source§impl Debug for TimePickerState
impl Debug for TimePickerState
Source§impl Default for TimePickerState
impl Default for TimePickerState
impl Eq for TimePickerState
Source§impl PartialEq for TimePickerState
impl PartialEq for TimePickerState
impl StructuralPartialEq for TimePickerState
Auto Trait Implementations§
impl Freeze for TimePickerState
impl RefUnwindSafe for TimePickerState
impl Send for TimePickerState
impl Sync for TimePickerState
impl Unpin for TimePickerState
impl UnsafeUnpin for TimePickerState
impl UnwindSafe for TimePickerState
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more