dsl_macros 0.1.0

Convenience macros that rewrites method calls inside a builder closure.
docs.rs failed to build dsl_macros-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

This macro can be used with various builders that use closures for configuration.

Examples

Without DSL:

rustless::Namespace::build("tweets", |tweets| { tweets.get("latest", |endpoint| { endpoint.desc("Get latest tweets"); endpoint.handle(|client, _params| { // body omitted }) });

tweet.post(/* omitted */);
tweet.delete(/* omitted */);

})

With DSL:

rustless::Namespace::build("tweets", dsl!(|tweets| { get("latest", dsl!(|endpoint| { desc("Get latest tweets"); handle(|client, _params| { // body omitted }) }));

post(/* omitted */);
delete(/* omitted */);

}))