Merge pull request 'MIB docs update' (#118) from mib-docs-update into main
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good
Reviewed-on: #118
This commit is contained in:
commit
3a6cd6712d
@ -1,3 +1,6 @@
|
|||||||
|
[![Crates.io](https://img.shields.io/crates/v/satrs-mib)](https://crates.io/crates/satrs-mib)
|
||||||
|
[![docs.rs](https://img.shields.io/docsrs/satrs-mib)](https://docs.rs/satrs-mib)
|
||||||
|
|
||||||
satrs-mib
|
satrs-mib
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
use quote::{format_ident, quote, ToTokens};
|
use quote::{format_ident, quote, ToTokens};
|
||||||
use syn::{parse_macro_input, ItemConst, LitStr};
|
use syn::{parse_macro_input, ItemConst, LitStr};
|
||||||
|
|
||||||
|
/// This macro can be used to automatically generate introspection information for return codes.
|
||||||
|
///
|
||||||
|
/// For example, it can be applied to types like the [satrs_shared::res_code::ResultU16] type
|
||||||
|
/// to automatically generate [satrs_mib::res_code::ResultU16Info] instances. These instances
|
||||||
|
/// can then be used for tasks like generating CSVs or YAML files with the list of all result
|
||||||
|
/// codes. This information is valuable for both operators and developers.
|
||||||
#[proc_macro_attribute]
|
#[proc_macro_attribute]
|
||||||
pub fn resultcode(
|
pub fn resultcode(
|
||||||
args: proc_macro::TokenStream,
|
args: proc_macro::TokenStream,
|
||||||
|
@ -73,6 +73,7 @@ pub mod stdmod {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This function exports a slice of result code information objects to a CSV file.
|
||||||
pub fn write_resultcodes_to_csv(
|
pub fn write_resultcodes_to_csv(
|
||||||
writer_builder: csv::WriterBuilder,
|
writer_builder: csv::WriterBuilder,
|
||||||
results: &[ResultU16Info],
|
results: &[ResultU16Info],
|
||||||
|
Loading…
Reference in New Issue
Block a user