pub struct SearchState {
pub results: Vec<SearchResultWithReplacement>,
pub view_offset: usize,
pub num_displayed: Option<usize>,
pub last_render: Instant,
pub phase: SearchPhase,
pub cancelled: Arc<AtomicBool>,
/* private fields */
}Fields§
§results: Vec<SearchResultWithReplacement>§view_offset: usize§num_displayed: Option<usize>§last_render: Instant§phase: SearchPhase§cancelled: Arc<AtomicBool>Implementations§
Source§impl SearchState
impl SearchState
pub fn new( processing_sender: UnboundedSender<BackgroundProcessingEvent>, processing_receiver: UnboundedReceiver<BackgroundProcessingEvent>, cancelled: Arc<AtomicBool>, ) -> Self
pub fn primary_selected_field_mut( &mut self, ) -> Option<&mut SearchResultWithReplacement>
pub fn primary_selected_pos(&self) -> usize
pub fn is_selected(&self, idx: usize) -> bool
pub fn is_primary_selected(&self, idx: usize) -> bool
Sourcepub fn set_complete_now(&mut self)
pub fn set_complete_now(&mut self)
Transition Running → Complete. No-op from any other phase — the
search this completion is for has been superseded.
pub fn set_pending(&mut self)
pub fn set_invalid(&mut self)
Trait Implementations§
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
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