pub struct PromptChain<Message>(/* private fields */);Expand description
Lightweight container that accumulates messages produced by
IntoPrompt implementors.
The single Vec field is kept private so the only way to obtain the result
is through Self::build, ensuring the builder API remains fluent.
Implementations§
Source§impl<Message> PromptChain<Message>
impl<Message> PromptChain<Message>
Sourcepub fn with(self, with: impl IntoPrompt<Message = Message>) -> Self
pub fn with(self, with: impl IntoPrompt<Message = Message>) -> Self
Append the messages produced by with to the chain.
The method takes self by value to encourage concise
call-chaining:
let vec = PromptChain::new()
.with(msg)
.build();Trait Implementations§
Auto Trait Implementations§
impl<Message> Freeze for PromptChain<Message>
impl<Message> RefUnwindSafe for PromptChain<Message>where
Vec<Message>: RefUnwindSafe,
impl<Message> Send for PromptChain<Message>
impl<Message> Sync for PromptChain<Message>
impl<Message> Unpin for PromptChain<Message>
impl<Message> UnsafeUnpin for PromptChain<Message>where
Vec<Message>: UnsafeUnpin,
impl<Message> UnwindSafe for PromptChain<Message>where
Vec<Message>: 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