Skip to main content

Approver

Trait Approver 

Source
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§

Source

fn ask(&self, p: &Presentation) -> Answer

The person’s answer to the presented call.

Provided Methods§

Source

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.

Source

fn via(&self) -> Via

Through what the person answers.

Source

fn client(&self) -> Option<String>

The client the person answers in (an editor’s name), if it says.

Source

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".

Implementors§