pub trait Approver:
Send
+ Sync
+ Debug {
// Required method
fn ask(&self, p: &Presentation) -> Answer;
// Provided methods
fn answer(&self, question: &str) -> Option<String> { ... }
fn via(&self) -> Via { ... }
fn client(&self) -> Option<String> { ... }
fn confirm(&self, request: &ConfirmRequest) -> Option<ConfirmAnswer> { ... }
}Expand description
Asks a person, synchronously, while an attempt waits (a terminal prompt in the CLI, a permission request in an editor). The answer is journaled; replay never asks again.
Required Methods§
Sourcefn ask(&self, p: &Presentation) -> Answer
fn ask(&self, p: &Presentation) -> Answer
The person’s answer to the presented call.
Provided Methods§
Sourcefn answer(&self, question: &str) -> Option<String>
fn answer(&self, question: &str) -> Option<String>
The person’s free-text answer to a question a hosted skill asks;
None when nobody can answer.
Sourcefn client(&self) -> Option<String>
fn client(&self) -> Option<String>
The client the person answers in (an editor’s name), if it says.
Sourcefn confirm(&self, request: &ConfirmRequest) -> Option<ConfirmAnswer>
fn confirm(&self, request: &ConfirmRequest) -> Option<ConfirmAnswer>
The person’s decision on a bug’s reproductions, bound to the digest
shown; None when nobody can decide here (the bug waits in the
inbox for speccoder bug confirm).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".