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
sourceimpl<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) -> Self where
U: IntoService<S, R>,
F: Fn() -> E + 'static,
Trait Implementations
sourceimpl<R, S, E> Clone for BufferService<R, S, E> where
S: Service<R, Error = E> + Clone,
impl<R, S, E> Clone for BufferService<R, S, E> where
S: Service<R, Error = E> + Clone,
sourceimpl<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>,
sourcefn 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 more
sourcefn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
fn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
Shutdown service. Read more
sourcefn 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>
impl<R, S, E> !UnwindSafe for BufferService<R, S, E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
impl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
sourcepub fn into_service(self) -> T
pub fn into_service(self) -> T
Convert to a Service
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more