Skip to main content

ApprovalSink

Trait ApprovalSink 

Source
pub trait ApprovalSink: Send {
    // Required method
    fn request(&self, scope: &str, reason: &str) -> Result<String, String>;
}
Expand description

Host boundary for the [approval] effect. request blocks until an operator answers — Ok(answer) on approve, Err(reason) on deny or timeout. Implementations decide what “blocks” means (a stdin prompt, an HTTP long-poll against a dashboard, …); the effect handler only needs the synchronous result.

Required Methods§

Source

fn request(&self, scope: &str, reason: &str) -> Result<String, String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§