Skip to main content

Affirm

Trait Affirm 

Source
pub trait Affirm: Prompt { }
Expand description

Binary confirmation (yes/no, true/false pattern).

This trait represents a yes/no confirmation dialog. It is the natural elicitation mode for boolean fields and confirmation prompts.

§Example

use elicitation::Affirm;

// bool implements Affirm by default
fn requires_affirm<T: Affirm>() {}
requires_affirm::<bool>();

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Affirm for bool

Implementors§