1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # derive-egui-form
//!
//! An egui form backend for derive-survey that renders surveys as GUI forms.
//!
//! This backend uses the `eframe` and `egui` crates to provide a native
//! desktop form interface for surveys. All fields are displayed at once
//! and can be edited in any order.
//!
//! ## Usage
//!
//! ```rust,ignore
//! use elicitor::Survey;
//! use elicitor_form_egui::EguiBackend;
//!
//! #[derive(Survey, Debug)]
//! struct UserProfile {
//! #[ask("What is your name?")]
//! name: String,
//!
//! #[ask("How old are you?")]
//! #[min(0)]
//! #[max(150)]
//! age: i64,
//! }
//!
//! fn main() -> anyhow::Result<()> {
//! let backend = EguiBackend::new()
//! .with_title("User Profile")
//! .with_window_size([400.0, 300.0]);
//!
//! let profile: UserProfile = UserProfile::builder().run(backend)?;
//! println!("{:?}", profile);
//! Ok(())
//! }
//! ```
pub use ;