pub struct ApprovalPendingMap { /* private fields */ }Expand description
Registry for in-flight tool approval requests.
The RpcApprovalChannel inserts a (request_id, oneshot::Sender) pair before sending the approval_request notification. handle_session_approve resolves it when the client sends session/approve.
Implementations§
Source§impl ApprovalPendingMap
impl ApprovalPendingMap
pub fn insert(&self, request_id: String, tx: Sender<ChannelApprovalResponse>)
pub fn resolve(&self, request_id: &str, response: ChannelApprovalResponse)
Trait Implementations§
Source§impl Default for ApprovalPendingMap
impl Default for ApprovalPendingMap
Source§fn default() -> ApprovalPendingMap
fn default() -> ApprovalPendingMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ApprovalPendingMap
impl RefUnwindSafe for ApprovalPendingMap
impl Send for ApprovalPendingMap
impl Sync for ApprovalPendingMap
impl Unpin for ApprovalPendingMap
impl UnsafeUnpin for ApprovalPendingMap
impl UnwindSafe for ApprovalPendingMap
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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