macro_rules! questions {
($($field:ident : $question:expr),+ $(,)?) => { ... };
}Expand description
Build a named request shape with inferred, checked answer fields.
Field names become wire keys. Expressions are evaluated once, and one definition can be reused. No procedural macro, code generator or runtime dependency is required.
ⓘ
let questions = questions! { department: &routing, second_department: &routing }?;
let response = client.decide(state, &questions).await?;
let answers = response.answers()?;
println!("{} {}", answers.department.choice, answers.second_department.choice);