Skip to main content

Prompt

Trait Prompt 

Source
pub trait Prompt {
    // Provided method
    fn prompt() -> Option<&'static str> { ... }
}
Expand description

Shared metadata for prompts across all elicitation patterns.

This trait provides optional prompt text to guide user interaction. Types can override this to provide custom prompts, or accept the default (None).

Provided Methods§

Source

fn prompt() -> Option<&'static str>

Optional prompt to guide user interaction.

Returns None by default. Implement this to provide a custom prompt for a type.

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 Prompt for IpAddr

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for SocketAddr

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for bool

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for char

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for f32

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for f64

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for i8

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for i16

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for i32

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for i64

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for i128

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for isize

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for u8

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for u16

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for u32

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for u64

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for u128

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for usize

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for String

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for Ipv4Addr

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for Ipv6Addr

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for SocketAddrV4

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for SocketAddrV6

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for Duration

Source§

fn prompt() -> Option<&'static str>

Source§

impl Prompt for PathBuf

Source§

fn prompt() -> Option<&'static str>

Source§

impl<K, V> Prompt for BTreeMap<K, V>
where K: Elicitation + Ord + Send, V: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<K, V> Prompt for HashMap<K, V>
where K: Elicitation + Hash + Eq + Send, V: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0> Prompt for (T0,)
where T0: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1> Prompt for (T0, T1)
where T0: Elicitation + Send, T1: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2> Prompt for (T0, T1, T2)
where T0: Elicitation + Send, T1: Elicitation + Send, T2: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3> Prompt for (T0, T1, T2, T3)
where T0: Elicitation + Send, T1: Elicitation + Send, T2: Elicitation + Send, T3: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4> Prompt for (T0, T1, T2, T3, T4)
where T0: Elicitation + Send, T1: Elicitation + Send, T2: Elicitation + Send, T3: Elicitation + Send, T4: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5> Prompt for (T0, T1, T2, T3, T4, T5)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Prompt for (T0, T1, T2, T3, T4, T5, T6)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Prompt for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Prompt for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Prompt for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Prompt for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Prompt for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for Box<T>
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for BTreeSet<T>
where T: Elicitation + Ord + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for LinkedList<T>
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for VecDeque<T>
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for Rc<T>
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for Arc<T>
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T> Prompt for HashSet<T>
where T: Elicitation + Hash + Eq + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T, E> Prompt for Result<T, E>
where T: Elicitation + Send, E: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T, const N: usize> Prompt for [T; N]
where T: Elicitation + Send,

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T: Elicitation + Send> Prompt for Option<T>

Source§

fn prompt() -> Option<&'static str>

Source§

impl<T: Elicitation + Send> Prompt for Vec<T>

Source§

fn prompt() -> Option<&'static str>

Implementors§

Source§

impl Prompt for I8NonZeroStyle

Source§

impl Prompt for I8RangeStyle

Source§

impl Prompt for I16NonZeroStyle

Source§

impl Prompt for I16RangeStyle

Source§

impl Prompt for I32RangeStyle

Source§

impl Prompt for I64RangeStyle

Source§

impl Prompt for I128RangeStyle

Source§

impl Prompt for IsizeRangeStyle

Source§

impl Prompt for U8RangeStyle

Source§

impl Prompt for U16RangeStyle

Source§

impl Prompt for U32RangeStyle

Source§

impl Prompt for U64RangeStyle

Source§

impl Prompt for U128RangeStyle

Source§

impl Prompt for UsizeRangeStyle

Source§

impl Prompt for BoolDefault

Source§

impl Prompt for BoolFalse

Source§

impl Prompt for BoolTrue

Source§

impl Prompt for CharAlphabetic

Source§

impl Prompt for CharAlphanumeric

Source§

impl Prompt for CharNumeric

Source§

impl Prompt for DurationPositive

Source§

impl Prompt for F32Default

Source§

impl Prompt for F32Finite

Source§

impl Prompt for F32NonNegative

Source§

impl Prompt for F32Positive

Source§

impl Prompt for F64Default

Source§

impl Prompt for F64Finite

Source§

impl Prompt for F64NonNegative

Source§

impl Prompt for F64Positive

Source§

impl Prompt for I8Default

Source§

impl Prompt for I8NonNegative

Source§

impl Prompt for I8NonZero

Source§

impl Prompt for I8Positive

Source§

impl Prompt for I16Default

Source§

impl Prompt for I16NonNegative

Source§

impl Prompt for I16NonZero

Source§

impl Prompt for I16Positive

Source§

impl Prompt for I32Default

Source§

impl Prompt for I32NonNegative

Source§

impl Prompt for I32NonZero

Source§

impl Prompt for I32Positive

Source§

impl Prompt for I64Default

Source§

impl Prompt for I64NonNegative

Source§

impl Prompt for I64NonZero

Source§

impl Prompt for I64Positive

Source§

impl Prompt for I128Default

Source§

impl Prompt for I128NonNegative

Source§

impl Prompt for I128NonZero

Source§

impl Prompt for I128Positive

Source§

impl Prompt for IpPrivate

Source§

impl Prompt for IpPublic

Source§

impl Prompt for IpV4

Source§

impl Prompt for IpV6

Source§

impl Prompt for Ipv4Loopback

Source§

impl Prompt for Ipv6Loopback

Source§

impl Prompt for IsizeDefault

Source§

impl Prompt for IsizeNonNegative

Source§

impl Prompt for IsizeNonZero

Source§

impl Prompt for IsizePositive

Source§

impl Prompt for PathBufExists

Source§

impl Prompt for PathBufIsDir

Source§

impl Prompt for PathBufIsFile

Source§

impl Prompt for PathBufReadable

Source§

impl Prompt for StringDefault

Source§

impl Prompt for U8Default

Source§

impl Prompt for U8NonZero

Source§

impl Prompt for U8Positive

Source§

impl Prompt for U16Default

Source§

impl Prompt for U16NonZero

Source§

impl Prompt for U16Positive

Source§

impl Prompt for U32Default

Source§

impl Prompt for U32NonZero

Source§

impl Prompt for U32Positive

Source§

impl Prompt for U64Default

Source§

impl Prompt for U64NonZero

Source§

impl Prompt for U64Positive

Source§

impl Prompt for U128Default

Source§

impl Prompt for U128NonZero

Source§

impl Prompt for U128Positive

Source§

impl Prompt for UsizeDefault

Source§

impl Prompt for UsizeNonZero

Source§

impl Prompt for UsizePositive

Source§

impl<C1, C2> Prompt for Tuple2<C1, C2>
where C1: Elicitation + Send, C2: Elicitation + Send,

Source§

impl<C1, C2, C3> Prompt for Tuple3<C1, C2, C3>
where C1: Elicitation + Send, C2: Elicitation + Send, C3: Elicitation + Send,

Source§

impl<C1, C2, C3, C4> Prompt for Tuple4<C1, C2, C3, C4>
where C1: Elicitation + Send, C2: Elicitation + Send, C3: Elicitation + Send, C4: Elicitation + Send,

Source§

impl<C, const N: usize> Prompt for ArrayAllSatisfy<C, N>
where C: Elicitation + Send,

Source§

impl<C: Elicitation + Send> Prompt for ArcSatisfies<C>

Source§

impl<C: Elicitation + Send> Prompt for BoxSatisfies<C>

Source§

impl<C: Elicitation + Send> Prompt for RcSatisfies<C>

Source§

impl<C: Elicitation + Send> Prompt for VecAllSatisfy<C>

Source§

impl<K, V> Prompt for BTreeMapNonEmpty<K, V>
where K: Elicitation + Send, V: Elicitation + Send,

Source§

impl<K, V> Prompt for HashMapNonEmpty<K, V>
where K: Elicitation + Send, V: Elicitation + Send,

Source§

impl<T> Prompt for BTreeSetNonEmpty<T>
where T: Elicitation + Send,

Source§

impl<T> Prompt for HashSetNonEmpty<T>
where T: Elicitation + Send,

Source§

impl<T> Prompt for LinkedListNonEmpty<T>
where T: Elicitation + Send,

Source§

impl<T> Prompt for VecDequeNonEmpty<T>
where T: Elicitation + Send,

Source§

impl<T: Elicitation + Send> Prompt for OptionSome<T>

Source§

impl<T: Elicitation + Send> Prompt for ResultOk<T>

Source§

impl<T: Elicitation + Send> Prompt for VecNonEmpty<T>

Source§

impl<const MAX_LEN: usize> Prompt for StringNonEmpty<MAX_LEN>

Source§

impl<const MIN: i8, const MAX: i8> Prompt for I8Range<MIN, MAX>

Source§

impl<const MIN: i16, const MAX: i16> Prompt for I16Range<MIN, MAX>

Source§

impl<const MIN: i32, const MAX: i32> Prompt for I32Range<MIN, MAX>

Source§

impl<const MIN: i64, const MAX: i64> Prompt for I64Range<MIN, MAX>

Source§

impl<const MIN: i128, const MAX: i128> Prompt for I128Range<MIN, MAX>

Source§

impl<const MIN: isize, const MAX: isize> Prompt for IsizeRange<MIN, MAX>

Source§

impl<const MIN: u8, const MAX: u8> Prompt for U8Range<MIN, MAX>

Source§

impl<const MIN: u16, const MAX: u16> Prompt for U16Range<MIN, MAX>

Source§

impl<const MIN: u32, const MAX: u32> Prompt for U32Range<MIN, MAX>

Source§

impl<const MIN: u64, const MAX: u64> Prompt for U64Range<MIN, MAX>

Source§

impl<const MIN: u128, const MAX: u128> Prompt for U128Range<MIN, MAX>

Source§

impl<const MIN: usize, const MAX: usize> Prompt for UsizeRange<MIN, MAX>