pub struct EtagCache<C, P, S> { /* private fields */ }Expand description
The eponymous tower Service
Implementations§
Source§impl<C, S> EtagCache<C, DefaultPredicate, S>
impl<C, S> EtagCache<C, DefaultPredicate, S>
pub fn with_default_predicate(cache_provider: C, inner: S) -> Self
Trait Implementations§
Source§impl<ReqBody, ResBody, C, P, S> Service<Request<ReqBody>> for EtagCache<C, P, S>where
C: CacheProvider<ReqBody, ResBody> + Clone,
P: PassthroughPredicate,
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone,
impl<ReqBody, ResBody, C, P, S> Service<Request<ReqBody>> for EtagCache<C, P, S>where
C: CacheProvider<ReqBody, ResBody> + Clone,
P: PassthroughPredicate,
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone,
Source§fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
EtagCacheServiceFuture poll_ready()s the different services depending on whether
the cache should be used
Source§type Response = Response<EtagCacheResBody<ResBody, <C as CacheProvider<ReqBody, ResBody>>::TResBody>>
type Response = Response<EtagCacheResBody<ResBody, <C as CacheProvider<ReqBody, ResBody>>::TResBody>>
Responses given by the service.
Source§type Error = EtagCacheServiceError<<C as Service<Request<ReqBody>>>::Error, <S as Service<Request<ReqBody>>>::Error, <C as Service<(<C as CacheProvider<ReqBody, ResBody>>::Key, Response<ResBody>)>>::Error>
type Error = EtagCacheServiceError<<C as Service<Request<ReqBody>>>::Error, <S as Service<Request<ReqBody>>>::Error, <C as Service<(<C as CacheProvider<ReqBody, ResBody>>::Key, Response<ResBody>)>>::Error>
Errors produced by the service.
Source§type Future = EtagCacheServiceFuture<ReqBody, ResBody, C, P, S>
type Future = EtagCacheServiceFuture<ReqBody, ResBody, C, P, S>
The future response value.
impl<C: Copy, P: Copy, S: Copy> Copy for EtagCache<C, P, S>
Auto Trait Implementations§
impl<C, P, S> Freeze for EtagCache<C, P, S>
impl<C, P, S> RefUnwindSafe for EtagCache<C, P, S>
impl<C, P, S> Send for EtagCache<C, P, S>
impl<C, P, S> Sync for EtagCache<C, P, S>
impl<C, P, S> Unpin for EtagCache<C, P, S>
impl<C, P, S> UnwindSafe for EtagCache<C, P, 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