pub struct ResourceBuilderWithContextHandler<F> { /* private fields */ }Expand description
Builder state after context-aware handler is specified.
Implementations§
Source§impl<F, Fut> ResourceBuilderWithContextHandler<F>where
F: Fn(RequestContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ReadResourceResult>> + Send + 'static,
impl<F, Fut> ResourceBuilderWithContextHandler<F>where
F: Fn(RequestContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ReadResourceResult>> + Send + 'static,
Sourcepub fn layer<L>(self, layer: L) -> ResourceBuilderWithContextLayer<F, L>
pub fn layer<L>(self, layer: L) -> ResourceBuilderWithContextLayer<F, L>
Apply a Tower layer (middleware) to this resource.
Works the same as ResourceBuilderWithHandler::layer.
Auto Trait Implementations§
impl<F> Freeze for ResourceBuilderWithContextHandler<F>where
F: Freeze,
impl<F> RefUnwindSafe for ResourceBuilderWithContextHandler<F>where
F: RefUnwindSafe,
impl<F> Send for ResourceBuilderWithContextHandler<F>where
F: Send,
impl<F> Sync for ResourceBuilderWithContextHandler<F>where
F: Sync,
impl<F> Unpin for ResourceBuilderWithContextHandler<F>where
F: Unpin,
impl<F> UnwindSafe for ResourceBuilderWithContextHandler<F>where
F: 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