pub struct SearchState {
pub pending: Vec<GrepMatch>,
pub total_seen: usize,
pub truncated: bool,
pub done: bool,
pub error: Option<String>,
}Expand description
Inner state of a streaming search, written by the host’s parallel
searchers and drained by the plugin via SearchHandle.take(). The plugin
observes deltas (mem::take on pending) at its own cadence; producers
write at full speed without per-chunk dispatches.
Fields§
§pending: Vec<GrepMatch>Matches accumulated since the consumer’s last drain
total_seen: usizeTotal matches the producer has emitted across the search’s lifetime
truncated: boolSet when the producer stopped early due to hitting max_results
done: boolSet when the producer is fully done — no more writes will occur
error: Option<String>Producer error, if any (final state)
Trait Implementations§
Source§impl Debug for SearchState
impl Debug for SearchState
Source§impl Default for SearchState
impl Default for SearchState
Source§fn default() -> SearchState
fn default() -> SearchState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchState
impl RefUnwindSafe for SearchState
impl Send for SearchState
impl Sync for SearchState
impl Unpin for SearchState
impl UnsafeUnpin for SearchState
impl UnwindSafe for SearchState
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