Struct ntex::util::buffer::BufferService
source · pub struct BufferService<R, S>where
S: Service<R>,{ /* private fields */ }Expand description
Buffer service - service that can buffer incoming requests.
Default number of buffered requests is 16
Implementations§
source§impl<R, S> BufferService<R, S>where
S: Service<R>,
impl<R, S> BufferService<R, S>where
S: Service<R>,
pub fn new<U>(size: usize, service: U) -> BufferService<R, S>where
U: IntoService<S, R>,
pub fn cancel_on_shutdown(self) -> BufferService<R, S>
Trait Implementations§
source§impl<R, S> Clone for BufferService<R, S>
impl<R, S> Clone for BufferService<R, S>
source§fn clone(&self) -> BufferService<R, S>
fn clone(&self) -> BufferService<R, S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<R, S> Debug for BufferService<R, S>
impl<R, S> Debug for BufferService<R, S>
source§impl<R, S> Service<R> for BufferService<R, S>where
S: Service<R>,
impl<R, S> Service<R> for BufferService<R, S>where
S: Service<R>,
§type Error = BufferServiceError<<S as Service<R>>::Error>
type Error = BufferServiceError<<S as Service<R>>::Error>
Errors produced by the service when polling readiness or executing call.
source§fn poll_ready(
&self,
cx: &mut Context<'_>
) -> Poll<Result<(), <BufferService<R, S> as Service<R>>::Error>>
fn poll_ready( &self, cx: &mut Context<'_> ) -> Poll<Result<(), <BufferService<R, S> as Service<R>>::Error>>
Returns
Ready when the service is able to process requests. Read moresource§async fn call(
&self,
req: R,
ctx: ServiceCtx<'_, BufferService<R, S>>
) -> Result<<BufferService<R, S> as Service<R>>::Response, <BufferService<R, S> as Service<R>>::Error>
async fn call( &self, req: R, ctx: ServiceCtx<'_, BufferService<R, S>> ) -> Result<<BufferService<R, S> as Service<R>>::Response, <BufferService<R, S> as Service<R>>::Error>
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<R, S> !Freeze for BufferService<R, S>
impl<R, S> !RefUnwindSafe for BufferService<R, S>
impl<R, S> !Send for BufferService<R, S>
impl<R, S> !Sync for BufferService<R, S>
impl<R, S> Unpin for BufferService<R, S>
impl<R, S> !UnwindSafe for BufferService<R, 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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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