Struct ntex_util::services::buffer::BufferService
source · pub struct BufferService<R, S: Service<R, Error = E>, E> { /* private fields */ }Expand description
Buffer service - service that can buffer incoming requests.
Default number of buffered requests is 16
Implementations§
source§impl<R, S, E> BufferService<R, S, E>where
S: Service<R, Error = E>,
impl<R, S, E> BufferService<R, S, E>where S: Service<R, Error = E>,
pub fn new<U, F>(size: usize, err: F, service: U) -> Selfwhere U: IntoService<S, R>, F: Fn() -> E + 'static,
Trait Implementations§
source§impl<R, S, E> Service<R> for BufferService<R, S, E>where
S: Service<R, Error = E>,
impl<R, S, E> Service<R> for BufferService<R, S, E>where S: Service<R, Error = E>,
§type Error = <S as Service<R>>::Error
type Error = <S as Service<R>>::Error
Errors produced by the service when polling readiness or executing call.
§type Future<'f>
where
Self: 'f,
R: 'f = Either<<S as Service<R>>::Future<'f>, BufferServiceResponse<'f, R, S, E>>
type Future<'f> where Self: 'f, R: 'f = Either<<S as Service<R>>::Future<'f>, BufferServiceResponse<'f, R, S, E>>
The future response value.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn call(&self, req: R) -> Self::Future<'_>
fn call(&self, req: R) -> Self::Future<'_>
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<R, S, E> !RefUnwindSafe for BufferService<R, S, E>
impl<R, S, E> !Send for BufferService<R, S, E>
impl<R, S, E> !Sync for BufferService<R, S, E>
impl<R, S, E> Unpin for BufferService<R, S, E>where R: Unpin, S: Unpin,
impl<R, S, E> !UnwindSafe for BufferService<R, S, E>
Blanket Implementations§
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Service