pub struct PromptRequest { /* private fields */ }Expand description
One prompt submission with an optional execution identity.
When an execution policy is attached, the agent automatically assigns an operation ID to requests that omit one. Attach a caller-owned ID when an external job, webhook, or host retry resubmits the same logical operation.
Implementations§
Source§impl PromptRequest
impl PromptRequest
Sourcepub fn new(prompt: impl Into<Prompt>) -> Self
pub fn new(prompt: impl Into<Prompt>) -> Self
Creates a prompt submission without a caller-owned operation identity.
A policy-enabled agent assigns a unique operation ID before accepting this request.
Sourcepub fn request_id(self, request_id: impl Into<String>) -> Self
pub fn request_id(self, request_id: impl Into<String>) -> Self
Supplies a stable caller-owned request identity.
When omitted, an execution policy generates an identity before the prompt is accepted. Resubmitting the same request ID with the same prompt resumes or replays that durable operation; reusing it for a different prompt is rejected as a conflict.
Trait Implementations§
Source§impl Clone for PromptRequest
impl Clone for PromptRequest
Source§fn clone(&self) -> PromptRequest
fn clone(&self) -> PromptRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptRequest
impl Debug for PromptRequest
Source§impl From<&str> for PromptRequest
impl From<&str> for PromptRequest
Source§impl From<Prompt> for PromptRequest
impl From<Prompt> for PromptRequest
Auto Trait Implementations§
impl Freeze for PromptRequest
impl RefUnwindSafe for PromptRequest
impl Send for PromptRequest
impl Sync for PromptRequest
impl Unpin for PromptRequest
impl UnsafeUnpin for PromptRequest
impl UnwindSafe for PromptRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.