features_table

Macro features_table 

Source
macro_rules! features_table {
    (
        setup = $setup:literal,
        $(
            $feature:tt => $status:ident($description:literal $(, $include_example:tt)?)
        ),* $(,)?
    ) => { ... };
    (@format_feature_name WebUI) => { ... };
    (@format_feature_name Serialization) => { ... };
    (@format_feature_name Workflow) => { ... };
    (@format_feature_name $feature:ident) => { ... };
    (@format_feature_name $feature:literal) => { ... };
    (@maybe_generate_doctest $setup:literal, $feature:tt, $status:ident, $include_example:tt) => { ... };
    (@maybe_generate_doctest $setup:literal, $feature:tt, $status:ident) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, $status:ident, true) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, $status:ident, false) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, supported, default) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, limited, default) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, not_implemented, default) => { ... };
    (@check_should_generate $setup:literal, $feature:tt, not_supported, default) => { ... };
    (@do_generate_doctest $setup:literal, $feature:ident, $status:ident) => { ... };
    (@assert_function Backend) => { ... };
    (@assert_function TaskSink) => { ... };
    (@assert_function MakeShared) => { ... };
    (@assert_function Workflow) => { ... };
    (@assert_function Serialization) => { ... };
    (@assert_function WaitForCompletion) => { ... };
    (@assert_function WebUI) => { ... };
    (@status_icon supported) => { ... };
    (@status_icon limited) => { ... };
    (@status_icon not_implemented) => { ... };
    (@status_icon not_supported) => { ... };
}
Expand description

Macro to generate feature tables for backend documentation with standardized assert functions

The table contains ONLY feature names, status icons, and descriptions. Code examples appear as separate sections below the table.

Usage:

use apalis_core::features_table;
features_table! {
    setup = "MemoryStorage::new();",
    TaskSink => supported("Ability to push new tasks", true),
    Serialization => limited("Serialization support for arguments. Only accepts `json`"),
    FetchById => not_implemented("Allow fetching a task by its ID"),
    RegisterWorker => not_supported("Allow registering a worker with the backend"),
}