pub struct TimeState {
pub value: Option<Time>,
pub focused: TimeSegment,
/* private fields */
}Expand description
State entity for TimeField.
Fields§
§value: Option<Time>The complete value exposed to callbacks, validation and forms.
focused: TimeSegmentThe segment that currently has focus.
Implementations§
Source§impl TimeState
impl TimeState
Sourcepub fn with_value(cx: &mut App, value: Time) -> Self
pub fn with_value(cx: &mut App, value: Time) -> Self
Creates a state holding value, focused on the hour segment.
Sourcepub fn bump_focused_from(&mut self, delta: i32, seed: Time)
pub fn bump_focused_from(&mut self, delta: i32, seed: Time)
Adjusts the focused segment, seeding an empty field from seed.
Sourcepub fn bump_focused(&mut self, delta: i32)
pub fn bump_focused(&mut self, delta: i32)
bump_focused_from seeded at midnight.
Auto Trait Implementations§
impl !RefUnwindSafe for TimeState
impl !UnwindSafe for TimeState
impl Freeze for TimeState
impl Send for TimeState
impl Sync for TimeState
impl Unpin for TimeState
impl UnsafeUnpin for TimeState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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