#[blueprint]Expand description
Defines a blueprint for creating a view from config.
It should be added to a type which defines how to build the view.
§Examples
ⓘ
#[cursive::blueprint(TextView::empty())]
struct BlueprintForTextview {
content: StyledString,
}This recipe will:
- Create a base view with
TextView::empty(). - Look for a
contentkey in the given config. - Try to resolve the associated value to a
StyledString. - Call
set_contenton the base with the resultingStyledString.