Skip to main content

Survey

Trait Survey 

Source
pub trait Survey: Prompt {
    // Required method
    fn fields() -> &'static [FieldInfo];
}
Expand description

Multi-field structured elicitation (form/wizard pattern).

This trait represents a multi-step form or wizard. It is the natural elicitation mode for structs and configuration objects.

The derive macro generates implementations of this trait for structs, creating a state machine that elicits each field in sequence.

Required Methods§

Source

fn fields() -> &'static [FieldInfo]

Field metadata for survey construction.

Returns information about each field in the struct, used to drive the elicitation state machine.

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.

Implementors§