pub struct SentinelService<S, R, B = ()>where
S: Service<R>,{ /* private fields */ }
Expand description
The sentinel middleware service in tower. If you the service request is from [http][] crate, and you are using nightly toolchain, you don’t need to provide a sentinel resource name extractor. The middleware will automatically extract the request uri.
Implementations§
Source§impl<S, R, B> SentinelService<S, R, B>where
S: Service<R>,
impl<S, R, B> SentinelService<S, R, B>where
S: Service<R>,
Trait Implementations§
Source§impl<S, R, B> Clone for SentinelService<S, R, B>
impl<S, R, B> Clone for SentinelService<S, R, B>
Source§impl<S, R> Service<R> for SentinelService<S, R>
You have to provide a sentinel resource name extractor
impl<S, R> Service<R> for SentinelService<S, R>
You have to provide a sentinel resource name extractor
Source§type Future = Pin<Box<dyn Future<Output = Result<<SentinelService<S, R> as Service<R>>::Response, <SentinelService<S, R> as Service<R>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<SentinelService<S, R> as Service<R>>::Response, <SentinelService<S, R> as Service<R>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<S, R, B> Freeze for SentinelService<S, R, B>where
S: Freeze,
impl<S, R, B> RefUnwindSafe for SentinelService<S, R, B>where
S: RefUnwindSafe,
B: RefUnwindSafe,
impl<S, R, B> Send for SentinelService<S, R, B>
impl<S, R, B> Sync for SentinelService<S, R, B>
impl<S, R, B> Unpin for SentinelService<S, R, B>
impl<S, R, B> UnwindSafe for SentinelService<S, R, B>where
S: UnwindSafe,
B: UnwindSafe,
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§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 more