macro_rules! declare_views {
    { $( $k:ident => $v:ty ),* $(,)? } => { ... };
}
Expand description

Create a set of views with unique names.

declare_views! {
    SomeDisplayView => TextView,
    SomeDataEntryView => EditView,
}
let mut siv = Cursive::new();
siv.add_layer::<SomeDisplayView>(TextView::new("Hello, world!").into());
assert_eq!(SomeDisplayView::find(&mut siv).get_content().source(), "Hello, world!");