pub struct BufferService<R, 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> + 'static,
R: 'static,
impl<R, S> BufferService<R, S>where
S: Service<R> + 'static,
R: 'static,
pub fn new(size: usize, service: S) -> Self
pub fn cancel_on_shutdown(self) -> Self
Trait Implementations§
source§impl<R, S> Clone for BufferService<R, S>
impl<R, S> Clone for BufferService<R, S>
source§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> + 'static,
R: 'static,
impl<R, S> Service<R> for BufferService<R, S>where
S: Service<R> + 'static,
R: 'static,
source§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§async fn ready(&self, _: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, _: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
source§async fn call(
&self,
req: R,
_: ServiceCtx<'_, Self>,
) -> Result<Self::Response, Self::Error>
async fn call( &self, req: R, _: ServiceCtx<'_, Self>, ) -> Result<Self::Response, Self::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>where
R: Unpin,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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