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:
parent
739038ddaf
commit
ca80343486
3 changed files with 211 additions and 185 deletions
|
@ -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>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue