With forced functional programming, you may be referring to serenity's builders? For example
.send_message(|m| m
.content("text")
.embed(|e| e
.description("...")
.timestamp("...")
)
.components(|c| c
.create_action_row(|r| r
.create_button(|b| b
.style(ButtonStyle::Primary)
.label("press me")
.custom_id("button1")
)
)
)
).await?;
In the next breaking release (`next` branch in git), we have a new by-value builder style which has
turned out to be a better design in many ways:
And a PR is open to make the API even better (replace redundant CreateComponents with Vec<CreateActionRow>) and more will be coming presumably.
Does this seem more rusty to you? We're open to more criticism - developmenet on serenity is quite active currently (e.g.
52 PRs merged in the last month)
Comments
The type in question has since been renamed to CommandDataOption, as well as other such long types (https://github.com/serenity-rs/serenity/pull/1899).
With forced functional programming, you may be referring to serenity's builders? For example
In the next breaking release (`next` branch in git), we have a new by-value builder style which has turned out to be a better design in many ways: And a PR is open to make the API even better (replace redundant CreateComponents with Vec<CreateActionRow>) and more will be coming presumably.Does this seem more rusty to you? We're open to more criticism - developmenet on serenity is quite active currently (e.g. 52 PRs merged in the last month)