pub struct AsyncFnApprovalHandler<F>(/* private fields */);Expand description
Approval handler backed by an async closure.
Use this for UI, channel, or service-backed approval policies that need to await a decision while a turn is being drained.
Implementations§
Source§impl<F> AsyncFnApprovalHandler<F>
impl<F> AsyncFnApprovalHandler<F>
Sourcepub fn new(handler: F) -> Self
pub fn new(handler: F) -> Self
Wraps an async closure as an ApprovalHandler.
Trait Implementations§
Source§impl<F> ApprovalHandler for AsyncFnApprovalHandler<F>
impl<F> ApprovalHandler for AsyncFnApprovalHandler<F>
fn handle<'a>(&'a self, request: &'a ServerRequest) -> ApprovalFuture<'a>
Auto Trait Implementations§
impl<F> Freeze for AsyncFnApprovalHandler<F>where
F: Freeze,
impl<F> RefUnwindSafe for AsyncFnApprovalHandler<F>where
F: RefUnwindSafe,
impl<F> Send for AsyncFnApprovalHandler<F>where
F: Send,
impl<F> Sync for AsyncFnApprovalHandler<F>where
F: Sync,
impl<F> Unpin for AsyncFnApprovalHandler<F>where
F: Unpin,
impl<F> UnsafeUnpin for AsyncFnApprovalHandler<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for AsyncFnApprovalHandler<F>where
F: UnwindSafe,
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