assistant: Add docs provider for docs.rs (#14356)

This PR adds an indexed docs provider for retrieving docs from `docs.rs`
using the `/docs` slash command.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-12 13:22:52 -04:00 committed by GitHub
parent 739038ddaf
commit ca80343486
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 211 additions and 185 deletions

View file

@ -21,12 +21,6 @@ use crate::IndexedDocsRegistry;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Deref, Display)]
pub struct ProviderId(pub Arc<str>);
impl ProviderId {
pub fn rustdoc() -> Self {
Self("rustdoc".into())
}
}
/// The name of a package.
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Deref, Display)]
pub struct PackageName(Arc<str>);