pub struct WebhookApprovalBackend { /* private fields */ }Expand description
HTTP webhook approval backend.
Sends a POST request with the ApprovalRequest JSON body to a configured
URL and expects the webhook to respond synchronously with an ApprovalResponse.
For asynchronous workflows (Slack, email), the webhook can hold the connection open until a decision is made, or return a denial with instructions.
Implementations§
Trait Implementations§
Source§impl ApprovalBackend for WebhookApprovalBackend
impl ApprovalBackend for WebhookApprovalBackend
Source§fn request_approval(
&self,
request: &ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<ApprovalResponse, ApprovalError>> + Send + '_>>
fn request_approval( &self, request: &ApprovalRequest, ) -> Pin<Box<dyn Future<Output = Result<ApprovalResponse, ApprovalError>> + Send + '_>>
Sends an approval request and waits for the human decision. Read more
Auto Trait Implementations§
impl Freeze for WebhookApprovalBackend
impl !RefUnwindSafe for WebhookApprovalBackend
impl Send for WebhookApprovalBackend
impl Sync for WebhookApprovalBackend
impl Unpin for WebhookApprovalBackend
impl UnsafeUnpin for WebhookApprovalBackend
impl !UnwindSafe for WebhookApprovalBackend
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