pub struct CacheService<S> { /* private fields */ }Expand description
Tower Service that caches responses.
Implementations§
Trait Implementations§
Source§impl<S: Clone> Clone for CacheService<S>
impl<S: Clone> Clone for CacheService<S>
Source§fn clone(&self) -> CacheService<S>
fn clone(&self) -> CacheService<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for CacheService<S>
impl<S: Debug> Debug for CacheService<S>
Source§impl<S> Service<McpRequest> for CacheService<S>where
S: Service<McpRequest, Response = McpResponse> + Clone + Send + 'static,
S::Future: Send,
S::Error: Into<McpError>,
impl<S> Service<McpRequest> for CacheService<S>where
S: Service<McpRequest, Response = McpResponse> + Clone + Send + 'static,
S::Future: Send,
S::Error: Into<McpError>,
Source§type Response = McpResponse
type Response = McpResponse
Responses given by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<CacheService<S> as Service<McpRequest>>::Response, <CacheService<S> as Service<McpRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<CacheService<S> as Service<McpRequest>>::Response, <CacheService<S> as Service<McpRequest>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<S> Freeze for CacheService<S>where
S: Freeze,
impl<S> !RefUnwindSafe for CacheService<S>
impl<S> Send for CacheService<S>where
S: Send,
impl<S> Sync for CacheService<S>where
S: Sync,
impl<S> Unpin for CacheService<S>where
S: Unpin,
impl<S> UnsafeUnpin for CacheService<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for CacheService<S>
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