pub struct Prompt {
pub context: Option<String>,
pub system: String,
pub task: Option<String>,
}Expand description
Assembled prompt envelope. Field order follows the canonical spec section order: context first, then the system message (role + appended directives), then task. Tools are not present here — they reach the model as structured data via the registry, not as a section in the prompt envelope.
Fields§
§context: Option<String>First user message; None means “no context block sent”.
system: StringAssembled system message: role + appended directives, joined by blank lines. May be empty when no role is set.
task: Option<String>Task message; None means the caller will supply a task later.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnsafeUnpin for Prompt
impl UnwindSafe for Prompt
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