pub struct DocCache { /* private fields */ }Expand description
Document cache service
Implementations§
Source§impl DocCache
impl DocCache
Sourcepub async fn get_crate_docs(
&self,
crate_name: &str,
version: Option<&str>,
) -> Option<String>
pub async fn get_crate_docs( &self, crate_name: &str, version: Option<&str>, ) -> Option<String>
Get cached document
Sourcepub async fn set_crate_docs(
&self,
crate_name: &str,
version: Option<&str>,
content: String,
) -> Result<()>
pub async fn set_crate_docs( &self, crate_name: &str, version: Option<&str>, content: String, ) -> Result<()>
Sourcepub async fn get_search_results(
&self,
query: &str,
limit: u32,
) -> Option<String>
pub async fn get_search_results( &self, query: &str, limit: u32, ) -> Option<String>
Get cached search results
Sourcepub async fn set_search_results(
&self,
query: &str,
limit: u32,
content: String,
) -> Result<()>
pub async fn set_search_results( &self, query: &str, limit: u32, content: String, ) -> Result<()>
Sourcepub async fn get_item_docs(
&self,
crate_name: &str,
item_path: &str,
version: Option<&str>,
) -> Option<String>
pub async fn get_item_docs( &self, crate_name: &str, item_path: &str, version: Option<&str>, ) -> Option<String>
Get cached item documentation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocCache
impl !RefUnwindSafe for DocCache
impl Send for DocCache
impl Sync for DocCache
impl Unpin for DocCache
impl UnsafeUnpin for DocCache
impl !UnwindSafe for DocCache
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