pub struct CacheInterceptor {
pub cacheManager: CacheManager,
pub allowedMethods: Vec<String>,
}Fields§
§cacheManager: CacheManager§allowedMethods: Vec<String>Implementations§
Source§impl CacheInterceptor
impl CacheInterceptor
pub fn new(cacheManager: CacheManager) -> Self
pub async fn intercept( &self, context: &mut ExecutionContext, next: CallHandler, ) -> Result<InterceptorResponse, CacheManagerError>
pub fn trackBy(&self, context: &ExecutionContext) -> Option<String>
pub fn isRequestCacheable(&self, context: &ExecutionContext) -> bool
pub fn setHeadersWhenHttp( &self, context: &mut ExecutionContext, value: Option<&CacheValue>, )
Trait Implementations§
Source§impl Clone for CacheInterceptor
impl Clone for CacheInterceptor
Source§fn clone(&self) -> CacheInterceptor
fn clone(&self) -> CacheInterceptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CacheInterceptor
impl !RefUnwindSafe for CacheInterceptor
impl Send for CacheInterceptor
impl Sync for CacheInterceptor
impl Unpin for CacheInterceptor
impl UnsafeUnpin for CacheInterceptor
impl !UnwindSafe for CacheInterceptor
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