pub struct Buffer<R> { /* private fields */ }Expand description
Buffer - service factory for service that can buffer incoming request.
Default number of buffered requests is 16
Implementations§
Trait Implementations§
Source§impl<R, S, C> Middleware<S, C> for Buffer<R>where
S: Service<R> + 'static,
R: 'static,
impl<R, S, C> Middleware<S, C> for Buffer<R>where
S: Service<R> + 'static,
R: 'static,
Source§type Service = BufferService<R, S>
type Service = BufferService<R, S>
The middleware
Service value created by this factorySource§fn create(&self, service: S, _: C) -> Self::Service
fn create(&self, service: S, _: C) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl<R> Freeze for Buffer<R>
impl<R> RefUnwindSafe for Buffer<R>where
R: RefUnwindSafe,
impl<R> Send for Buffer<R>where
R: Send,
impl<R> Sync for Buffer<R>where
R: Sync,
impl<R> Unpin for Buffer<R>where
R: Unpin,
impl<R> UnsafeUnpin for Buffer<R>
impl<R> UnwindSafe for Buffer<R>where
R: UnwindSafe,
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