#[view]Expand description
See the “Usage” section of README.md or the repository examples for details on how to use this macro.
§Basic usage
use declarative_macros::view;
#[view {
String::new() mut greeting {
push_str: "Hello world!"
}
}]
fn usage() -> String {
expand_view_here! { }
greeting
}§Alternate usage
use declarative_macros::view;
#[view]
mod example {
view! {
String::new() mut greeting {
push_str: "Hello world!"
}
}
fn usage() -> String {
expand_view_here! { }
greeting
}
}