#[non_exhaustive]pub struct RunOptions {
pub cancellation: CancellationToken,
pub controls: TurnControls,
}Expand description
Everything one Session::run_with_options call can override. Defaults
(RunOptions::default()) reproduce plain Session::run: an
uncancellable turn on the agent’s default model.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cancellation: CancellationTokenClone this before calling and cancel the clone from elsewhere to
stop the turn — see CancellationToken.
controls: TurnControlsPer-turn model/reasoning overrides — see TurnControls.
Implementations§
Source§impl RunOptions
impl RunOptions
Sourcepub fn cancellation(self, token: CancellationToken) -> Self
pub fn cancellation(self, token: CancellationToken) -> Self
Stop the turn from elsewhere — see CancellationToken.
Sourcepub fn controls(self, controls: TurnControls) -> Self
pub fn controls(self, controls: TurnControls) -> Self
Per-turn model/reasoning overrides — see TurnControls.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunOptions
impl RefUnwindSafe for RunOptions
impl Send for RunOptions
impl Sync for RunOptions
impl Unpin for RunOptions
impl UnsafeUnpin for RunOptions
impl UnwindSafe for RunOptions
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