Promote package suggestions to a first-class concept on IndexedDocsProvider
s (#16177)
This PR promotes package suggestions to a first-class concept on the `IndexedDocsProvider` trait. This will allow any implementer of `IndexedDocsProvider` to provide a list of package names to suggest for use with `/docs`. For the docs.rs provider we use the 250 most popular Rust crates (as identified [here](https://lib.rs/std)), and for the rustdoc provider we use the packages in the Cargo workspace. Release Notes: - N/A
This commit is contained in:
parent
bd71e9192c
commit
a81e355dc5
6 changed files with 328 additions and 93 deletions
|
@ -30,6 +30,10 @@ impl IndexedDocsProvider for ExtensionIndexedDocsProvider {
|
|||
database_path
|
||||
}
|
||||
|
||||
async fn suggest_packages(&self) -> Result<Vec<PackageName>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
async fn index(&self, package: PackageName, database: Arc<IndexedDocsDatabase>) -> Result<()> {
|
||||
self.extension
|
||||
.call({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue