pub struct KeepAliveService<R, E, F> { /* private fields */ }Implementations§
Source§impl<R, E, F> KeepAliveService<R, E, F>where
F: Fn() -> E,
impl<R, E, F> KeepAliveService<R, E, F>where
F: Fn() -> E,
pub fn new(ka: Duration, time: LowResTimeService, f: F) -> Self
Trait Implementations§
Source§impl<R, E, F> Service for KeepAliveService<R, E, F>where
F: Fn() -> E,
impl<R, E, F> Service for KeepAliveService<R, E, F>where
F: Fn() -> E,
Source§fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moreSource§fn call(&mut self, req: R) -> Self::Future
fn call(&mut self, req: R) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<R, E, F> Freeze for KeepAliveService<R, E, F>where
F: Freeze,
impl<R, E, F> !RefUnwindSafe for KeepAliveService<R, E, F>
impl<R, E, F> !Send for KeepAliveService<R, E, F>
impl<R, E, F> !Sync for KeepAliveService<R, E, F>
impl<R, E, F> Unpin for KeepAliveService<R, E, F>
impl<R, E, F> !UnwindSafe for KeepAliveService<R, E, F>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoService<T> for Twhere
T: Service,
impl<T> IntoService<T> for Twhere
T: Service,
Source§fn into_service(self) -> T
fn into_service(self) -> T
Convert to a
Service