pub struct PathSearcher { /* private fields */ }Implementations§
Source§impl PathSearcher
impl PathSearcher
pub async fn new<S: Server, D: LocalDocuments>(lb: &Lb<S, D>) -> Self
Sourcepub fn from_files(entries: impl IntoIterator<Item = (File, String)>) -> Self
pub fn from_files(entries: impl IntoIterator<Item = (File, String)>) -> Self
Build a path index from an in-memory file list (File + path string).
Same matcher as Self::new; used by editor link completions so they
share ranking (including empty-query recents) with filename search.
Sourcepub fn update_filter(&mut self, filter: Option<SearchFilter>)
pub fn update_filter(&mut self, filter: Option<SearchFilter>)
Update the active filter and refresh results for the current query.
Sourcepub fn results(&self) -> &[SearchResult]
pub fn results(&self) -> &[SearchResult]
Get search results.
Auto Trait Implementations§
impl !RefUnwindSafe for PathSearcher
impl !UnwindSafe for PathSearcher
impl Forget for PathSearcher
impl Freeze for PathSearcherwhere
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
*const ArcInner<Mutex<RawMutex, Worker<PathEntry>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<RawMutex, Worker<PathEntry>>>>: Freeze,
*const ArcInner<Registry> is !null: Freeze,
PhantomData<ArcInner<Registry>>: Freeze,
*const ArcInner<Vec<PathEntry>> is !null: Freeze,
PhantomData<ArcInner<Vec<PathEntry>>>: Freeze,
*const ArcInner<dyn Fn() + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn() + Sync + Send>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Match>: Freeze,
PhantomData<(Pattern, Status)>: Freeze,
PhantomData<SearchResult>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(Uuid, Vec<Uuid>)>: Freeze,
PhantomData<(String, Uuid)>: Freeze,
PhantomData<(Uuid, ())>: Freeze,
PhantomData<Uuid>: Freeze,
impl Move for PathSearcher
impl Send for PathSearcherwhere
Arc<Atomic<bool>>: Send,
Arc<Mutex<RawMutex, Worker<PathEntry>>>: Send,
Arc<Registry>: Send,
Arc<Vec<PathEntry>>: Send,
Arc<dyn Fn() + Sync + Send>: Send,
RawVecInner: Send,
BoxRaw<str>: Send,
BoxRaw<[char]>: Send,
RawTable<(Uuid, Vec<Uuid>)>: Send,
RawTable<(String, Uuid)>: Send,
RawTable<(Uuid, ())>: Send,
impl Sync for PathSearcherwhere
Arc<Atomic<bool>>: Sync,
Arc<Mutex<RawMutex, Worker<PathEntry>>>: Sync,
Arc<Registry>: Sync,
Arc<Vec<PathEntry>>: Sync,
Arc<dyn Fn() + Sync + Send>: Sync,
RawVecInner: Sync,
BoxRaw<str>: Sync,
BoxRaw<[char]>: Sync,
RawTable<(Uuid, Vec<Uuid>)>: Sync,
RawTable<(String, Uuid)>: Sync,
RawTable<(Uuid, ())>: Sync,
impl Unpin for PathSearcher
impl UnsafeUnpin for PathSearcherwhere
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, Worker<PathEntry>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<RawMutex, Worker<PathEntry>>>>: UnsafeUnpin,
*const ArcInner<Registry> is !null: UnsafeUnpin,
PhantomData<ArcInner<Registry>>: UnsafeUnpin,
*const ArcInner<Vec<PathEntry>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<PathEntry>>>: UnsafeUnpin,
*const ArcInner<dyn Fn() + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() + Sync + Send>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Match>: UnsafeUnpin,
PhantomData<(Pattern, Status)>: UnsafeUnpin,
PhantomData<SearchResult>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(Uuid, Vec<Uuid>)>: UnsafeUnpin,
PhantomData<(String, Uuid)>: UnsafeUnpin,
PhantomData<(Uuid, ())>: UnsafeUnpin,
PhantomData<Uuid>: UnsafeUnpin,
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
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