pub struct ApprovalResponder { /* private fields */ }Available on crate feature
human-loop only.Expand description
审批响应器:用于向 Agent 返回用户的审批决策
通过 ApprovalResponder::respond 方法返回用户决定。
如果响应器被丢弃而未调用 respond,视为拒绝。
Implementations§
Source§impl ApprovalResponder
impl ApprovalResponder
Sourcepub fn respond(self, decision: ApprovalDecision)
pub fn respond(self, decision: ApprovalDecision)
返回用户的审批决策
Sourcepub fn approve_with_scope(self, scope: ApprovalScope)
pub fn approve_with_scope(self, scope: ApprovalScope)
快捷方法:带范围批准
Sourcepub fn approve_modified(self, args: Value, scope: ApprovalScope)
pub fn approve_modified(self, args: Value, scope: ApprovalScope)
快捷方法:修改参数后批准
Trait Implementations§
Source§impl Debug for ApprovalResponder
impl Debug for ApprovalResponder
Auto Trait Implementations§
impl Freeze for ApprovalResponder
impl !RefUnwindSafe for ApprovalResponder
impl Send for ApprovalResponder
impl Sync for ApprovalResponder
impl Unpin for ApprovalResponder
impl UnsafeUnpin for ApprovalResponder
impl !UnwindSafe for ApprovalResponder
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request