mantra-rust-trace

Crates.iomantra-rust-trace
lib.rsmantra-rust-trace
version0.6.1
sourcesrc
created_at2024-04-29 13:07:24.018446
updated_at2024-07-04 09:05:52.773912
descriptionCollects requirement traces from rust code for the `mantra` framework.
homepage
repositoryhttps://github.com/mhatzl/mantra
max_upload_size
id1224166
size4,954
Manuel Hatzl (mhatzl)

documentation

README

mantra-rust-trace

Crate providing a collection function to collect requirement traces from rust code, using the AstCollector from mantra-lang-tracing. It collects traces set using req or reqcov from mantra-rust-macros, and traces set in doc-comments using the form [req(<requirement id(s)>)].

Examples:

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,
}
Commit count: 272

cargo fmt