pub enum SearchPhase {
Pending,
Invalid,
Running {
started: Instant,
},
Complete {
started: Instant,
completed: Instant,
},
}Expand description
Lifecycle of a single search, modelled explicitly so the view and the event handlers can’t disagree about what’s currently happening.
Typical transitions: Pending → Running → Complete. Pending models
the window between a user edit and the debounced search actually starting;
Invalid means the current inputs no longer describe a runnable search but
stale results may still be visible; Running is an in-flight search;
Complete is terminal.
Variants§
Implementations§
Source§impl SearchPhase
impl SearchPhase
Trait Implementations§
Source§impl Clone for SearchPhase
impl Clone for SearchPhase
Source§fn clone(&self) -> SearchPhase
fn clone(&self) -> SearchPhase
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 SearchPhase
Auto Trait Implementations§
impl Freeze for SearchPhase
impl RefUnwindSafe for SearchPhase
impl Send for SearchPhase
impl Sync for SearchPhase
impl Unpin for SearchPhase
impl UnsafeUnpin for SearchPhase
impl UnwindSafe for SearchPhase
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<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