pub struct PromptBuilderWithContextHandler<F> { /* private fields */ }Expand description
Builder state after context-aware handler is specified
Implementations§
Source§impl<F, Fut> PromptBuilderWithContextHandler<F>
impl<F, Fut> PromptBuilderWithContextHandler<F>
Sourcepub fn layer<L>(self, layer: L) -> Promptwhere
L: Layer<PromptContextHandlerService<F>> + Send + Sync + 'static,
L::Service: Service<PromptRequest, Response = GetPromptResult> + Clone + Send + 'static,
<L::Service as Service<PromptRequest>>::Error: Display + Send,
<L::Service as Service<PromptRequest>>::Future: Send,
pub fn layer<L>(self, layer: L) -> Promptwhere
L: Layer<PromptContextHandlerService<F>> + Send + Sync + 'static,
L::Service: Service<PromptRequest, Response = GetPromptResult> + Clone + Send + 'static,
<L::Service as Service<PromptRequest>>::Error: Display + Send,
<L::Service as Service<PromptRequest>>::Future: Send,
Apply a tower middleware layer to this prompt
Auto Trait Implementations§
impl<F> Freeze for PromptBuilderWithContextHandler<F>where
F: Freeze,
impl<F> RefUnwindSafe for PromptBuilderWithContextHandler<F>where
F: RefUnwindSafe,
impl<F> Send for PromptBuilderWithContextHandler<F>where
F: Send,
impl<F> Sync for PromptBuilderWithContextHandler<F>where
F: Sync,
impl<F> Unpin for PromptBuilderWithContextHandler<F>where
F: Unpin,
impl<F> UnwindSafe for PromptBuilderWithContextHandler<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