#requirements #trace #framework #collect #mantra #doc-comment

mantra-rust-trace

从 Rust 代码收集 mantra 框架的要求跟踪

6 个版本 (重大变更)

0.6.1 2024 年 7 月 4 日
0.6.0 2024 年 7 月 1 日
0.5.0 2024 年 6 月 14 日
0.4.0 2024 年 6 月 13 日
0.1.0 2024 年 4 月 29 日

#16 in #requirements

Download history 143/week @ 2024-04-28 3/week @ 2024-05-05 7/week @ 2024-05-19 139/week @ 2024-05-26 10/week @ 2024-06-02 211/week @ 2024-06-09 50/week @ 2024-06-16 1/week @ 2024-06-23 343/week @ 2024-06-30 9/week @ 2024-07-07 1/week @ 2024-07-14 56/week @ 2024-07-28

每月 78 次下载
mantra 中使用

MIT 许可证

21KB
382 代码行(不包括注释)

mantra-rust-trace

Crate 提供一个收集函数,用于从 Rust 代码中收集要求跟踪,使用来自 mantra-lang-tracingAstCollector。它收集使用 reqreqcovmantra-rust-macros 设置的跟踪,以及使用以下形式的文档注释中设置的跟踪:[req(<requirement id()>)].

示例

use mantra_rust_macros::{req, reqcov};

#[req(fn_trace)]
fn some_fn() {
    reqcov!(function_like_trace);
}

#[req(struct_trace)]
struct SomeStruct {
    /// Attribute macros cannot be set for fields.
    /// But setting a trace in doc-comments works: [req(doc_comment_trace)]
    some_field: bool,
}

依赖项

~1.5–2.4MB
~50K SLoC