Macro cursive_core::manual_blueprint
source · macro_rules! manual_blueprint { ($name:ident from $config_builder:expr) => { ... }; (with $name:ident, $builder:expr) => { ... }; ($name:ident, $builder:expr) => { ... }; }
Expand description
Define a blueprint to manually build this view from a config file.
Note: this is entirely ignored (not even type-checked) if the builder feature is not
enabled.
There are 3 variants of this macro:
manual_blueprint!(Identifier, |config, context| make_the_view(...))This registers the recipe underIdentifier, and uses the given closure to build the view.manual_blueprint!(Identifier from { parse_some_config(...) })This register underIdentifiera recipe that forwards the creation to another config usingContext::build_template.manual_blueprint(with Identifier, |config, context| Ok(|view| wrap_the_view(view, …)))This register a "with" blueprint underIdentifier`, which will prepare a view wrapper.