pub struct RequestOptions<'a> { /* private fields */ }Expand description
Per-call request options for Client::decide_with and Client::raw.
Fields left unset fall back to the Client’s configured defaults
(with_model, with_session_id, with_user).
Implementations§
Source§impl<'a> RequestOptions<'a>
impl<'a> RequestOptions<'a>
Sourcepub fn with_questions(self, questions: &'a Questions) -> Self
pub fn with_questions(self, questions: &'a Questions) -> Self
Sets the questions to send. Required for Client::raw; ignored by
Client::decide_with, which always uses D::questions().
Sourcepub fn with_model(self, model: Model) -> Self
pub fn with_model(self, model: Model) -> Self
Overrides the client’s configured model for this call only.
Sourcepub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
Sets a session identifier grouping this request with related ones (Decisions surface only; dropped on System One).
Sourcepub fn with_user(self, user: impl Into<String>) -> Self
pub fn with_user(self, user: impl Into<String>) -> Self
Sets an application-defined user identifier (Decisions surface only; dropped on System One).
Sourcepub fn with_trace(self, trace: TraceConfig) -> Self
pub fn with_trace(self, trace: TraceConfig) -> Self
Sets opaque trace configuration (Decisions surface only; dropped on System One).
Trait Implementations§
Source§impl<'a> Clone for RequestOptions<'a>
impl<'a> Clone for RequestOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for RequestOptions<'a>
impl<'a> RefUnwindSafe for RequestOptions<'a>
impl<'a> Send for RequestOptions<'a>
impl<'a> Sync for RequestOptions<'a>
impl<'a> Unpin for RequestOptions<'a>
impl<'a> UnsafeUnpin for RequestOptions<'a>
impl<'a> UnwindSafe for RequestOptions<'a>
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