pub struct CancelOptionsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> CancelOptionsBuilder<S>
impl<S: State> CancelOptionsBuilder<S>
Sourcepub fn build(self) -> CancelOptionswhere
S: IsComplete,
pub fn build(self) -> CancelOptionswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn message(
self,
value: impl Into<String>,
) -> CancelOptionsBuilder<SetMessage<S>>where
S::Message: IsUnset,
pub fn message(
self,
value: impl Into<String>,
) -> CancelOptionsBuilder<SetMessage<S>>where
S::Message: IsUnset,
Sourcepub fn maybe_message(
self,
value: Option<impl Into<String>>,
) -> CancelOptionsBuilder<SetMessage<S>>where
S::Message: IsUnset,
pub fn maybe_message(
self,
value: Option<impl Into<String>>,
) -> CancelOptionsBuilder<SetMessage<S>>where
S::Message: IsUnset,
Sourcepub fn after_current_tools(
self,
value: bool,
) -> CancelOptionsBuilder<SetAfterCurrentTools<S>>where
S::AfterCurrentTools: IsUnset,
pub fn after_current_tools(
self,
value: bool,
) -> CancelOptionsBuilder<SetAfterCurrentTools<S>>where
S::AfterCurrentTools: IsUnset,
Optional (Some / Option setters).
Default: false.
Defer cancellation until the running tool batch finishes, so sibling tools complete
normally instead of seeing the signal fire. Only the agent loop acts on the deferral: it
stops after the batch. Until then CancelSignal::is_cancelled stays false for every
other observer.
Sourcepub fn maybe_after_current_tools(
self,
value: Option<bool>,
) -> CancelOptionsBuilder<SetAfterCurrentTools<S>>where
S::AfterCurrentTools: IsUnset,
pub fn maybe_after_current_tools(
self,
value: Option<bool>,
) -> CancelOptionsBuilder<SetAfterCurrentTools<S>>where
S::AfterCurrentTools: IsUnset,
Optional (Some / Option setters).
Default: false.
Defer cancellation until the running tool batch finishes, so sibling tools complete
normally instead of seeing the signal fire. Only the agent loop acts on the deferral: it
stops after the batch. Until then CancelSignal::is_cancelled stays false for every
other observer.
Sourcepub fn cancel_background_tasks(
self,
value: bool,
) -> CancelOptionsBuilder<SetCancelBackgroundTasks<S>>where
S::CancelBackgroundTasks: IsUnset,
pub fn cancel_background_tasks(
self,
value: bool,
) -> CancelOptionsBuilder<SetCancelBackgroundTasks<S>>where
S::CancelBackgroundTasks: IsUnset,
Optional (Some / Option setters).
Default: false.
Also cancel every queued, working or input-required background task of the agent
immediately, even with after_current_tools and whether or not an invocation is running
(cancelBackgroundTasks). Background tasks keep running by default, and a
cancel_signal passed into an invocation never cancels them. Their cancelled results are
delivered like a cancel the model requested. If the invocation was only waiting for its
background tasks, it ends with its natural stop reason and the results are delivered on the
next invocation. Only an agent’s own handle acts on it.
Sourcepub fn maybe_cancel_background_tasks(
self,
value: Option<bool>,
) -> CancelOptionsBuilder<SetCancelBackgroundTasks<S>>where
S::CancelBackgroundTasks: IsUnset,
pub fn maybe_cancel_background_tasks(
self,
value: Option<bool>,
) -> CancelOptionsBuilder<SetCancelBackgroundTasks<S>>where
S::CancelBackgroundTasks: IsUnset,
Optional (Some / Option setters).
Default: false.
Also cancel every queued, working or input-required background task of the agent
immediately, even with after_current_tools and whether or not an invocation is running
(cancelBackgroundTasks). Background tasks keep running by default, and a
cancel_signal passed into an invocation never cancels them. Their cancelled results are
delivered like a cancel the model requested. If the invocation was only waiting for its
background tasks, it ends with its natural stop reason and the results are delivered on the
next invocation. Only an agent’s own handle acts on it.
Auto Trait Implementations§
impl<S> Freeze for CancelOptionsBuilder<S>
impl<S> RefUnwindSafe for CancelOptionsBuilder<S>
impl<S> Send for CancelOptionsBuilder<S>
impl<S> Sync for CancelOptionsBuilder<S>
impl<S> Unpin for CancelOptionsBuilder<S>
impl<S> UnsafeUnpin for CancelOptionsBuilder<S>
impl<S> UnwindSafe for CancelOptionsBuilder<S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more