pub struct InterceptorCache { /* private fields */ }Expand description
拦截器缓存管理器
为每个客户端实例管理拦截器的生命周期,避免重复创建。 使用 Arc 来实现零成本的拦截器共享。
Implementations§
Source§impl InterceptorCache
impl InterceptorCache
Sourcepub fn get_or_create<T>(&mut self) -> Arc<T>
pub fn get_or_create<T>(&mut self) -> Arc<T>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InterceptorCache
impl !RefUnwindSafe for InterceptorCache
impl Send for InterceptorCache
impl Sync for InterceptorCache
impl Unpin for InterceptorCache
impl !UnwindSafe for InterceptorCache
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