pub struct GetPromptResult {
pub description: Option<String>,
pub messages: Vec<PromptMessage>,
}Expand description
What prompts/get answers with.
Built from the messages rather than carrying them, so the description has
one obvious source: the prompt’s own, already registered for prompts/list.
Reading it from here instead would leave two places that can disagree.
Fields§
§description: Option<String>The prompt’s own description, echoed back.
messages: Vec<PromptMessage>The messages, in order.
Implementations§
Source§impl GetPromptResult
impl GetPromptResult
Sourcepub const fn new(messages: Vec<PromptMessage>) -> Self
pub const fn new(messages: Vec<PromptMessage>) -> Self
The messages, with no description.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
The same result, with a description.
Trait Implementations§
Source§impl Clone for GetPromptResult
impl Clone for GetPromptResult
Source§impl Debug for GetPromptResult
impl Debug for GetPromptResult
Source§impl PartialEq for GetPromptResult
impl PartialEq for GetPromptResult
impl StructuralPartialEq for GetPromptResult
Auto Trait Implementations§
impl Freeze for GetPromptResult
impl RefUnwindSafe for GetPromptResult
impl Send for GetPromptResult
impl Sync for GetPromptResult
impl Unpin for GetPromptResult
impl UnsafeUnpin for GetPromptResult
impl UnwindSafe for GetPromptResult
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