pub enum HitCount {
Unsearched,
Counting,
None,
Known {
total: usize,
current: Option<usize>,
},
TooMany {
counted: usize,
},
Unavailable(SharedString),
}Expand description
How many hits the host says the query has.
Counting is not zero, and a count that stopped early is not a count. A field that renders an unfinished search as “No results” tells the typist their query matched nothing, which nobody has established yet.
Variants§
Unsearched
Nothing has been searched, so nothing is claimed. A field with an empty query sits here.
Counting
The host is looking right now.
None
The host looked and found nothing.
Known
The host counted. current is the hit the typist is on, zero-based,
or None when the hits are known and no particular one is current.
TooMany
The host stopped counting at counted and there are more.
Distinct from HitCount::Known because “at least 500” is not 500,
and a replace-all that trusted it would change a number nobody knows.
The host could not search, in its own words.
Implementations§
Trait Implementations§
impl Eq for HitCount
impl StructuralPartialEq for HitCount
Auto Trait Implementations§
impl Freeze for HitCount
impl RefUnwindSafe for HitCount
impl Send for HitCount
impl Sync for HitCount
impl Unpin for HitCount
impl UnsafeUnpin for HitCount
impl UnwindSafe for HitCount
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().