pub struct RunningTool {
pub stopped: Pending<Result<(), ActionCallError>>,
/* private fields */
}Expand description
A tool call an agent’s session runs, as the host keeps it
(ActionProvider::tool_started): the invocation its person reads while the
call runs and may stop. The session holds it around the tool’s own work and
tells the host how that ended.
Fields§
§stopped: Pending<Result<(), ActionCallError>>Resolves when the person stops the call.
Implementations§
Source§impl RunningTool
impl RunningTool
Sourcepub fn new(
stopped: Pending<Result<(), ActionCallError>>,
stop_noted: Arc<AtomicBool>,
end: impl FnOnce(bool) + Send + Sync + 'static,
) -> Self
pub fn new( stopped: Pending<Result<(), ActionCallError>>, stop_noted: Arc<AtomicBool>, end: impl FnOnce(bool) + Send + Sync + 'static, ) -> Self
A tool call whose stopped resolves when its person stops it, stop_noted says
whether the stop reached its record, and end the host runs once the call ended,
true where it was stopped.
Sourcepub fn was_stopped(&self) -> bool
pub fn was_stopped(&self) -> bool
Whether its person’s stop reached its record.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RunningTool
impl !UnwindSafe for RunningTool
impl Forget for RunningTool
impl Freeze for RunningTool
impl Move for RunningTool
impl Send for RunningTool
impl Sync for RunningTool
impl Unpin for RunningTool
impl UnsafeUnpin for RunningTool
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
Converts
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> ⓘ
Converts
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