1
0
forked from ROMEO/nexosim

Merge pull request #44 from asynchronics/feature/improve-docgen

Feature/improve docgen
This commit is contained in:
Serge Barral 2024-09-08 17:40:09 +02:00 committed by GitHub
commit d898fb3f05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 27 additions and 19 deletions

View File

@ -163,3 +163,5 @@ jobs:
- name: Run cargo doc - name: Run cargo doc
run: cargo doc --no-deps --all-features --document-private-items run: cargo doc --no-deps --all-features --document-private-items
env:
RUSTDOCFLAGS: --cfg docsrs -Dwarnings

View File

@ -72,7 +72,7 @@ asynchronix = "0.2.2"
// //
// ┌──────────────┐ ┌──────────────┐ // ┌──────────────┐ ┌──────────────┐
// │ │ │ │ // │ │ │ │
// Input ●─────▶│ multiplier 1 ├─────▶│ multiplier 2 ├─────▶ Output // Input ●─────►│ multiplier 1 ├─────►│ multiplier 2 ├─────► Output
// │ │ │ │ // │ │ │ │
// └──────────────┘ └──────────────┘ // └──────────────┘ └──────────────┘
use asynchronix::model::{Model, Output}; use asynchronix::model::{Model, Output};

View File

@ -71,6 +71,10 @@ tonic-build = { version = "0.12" }
# `asynchronix_grpc_codegen` flag: regenerate gRPC code from .proto definitions. # `asynchronix_grpc_codegen` flag: regenerate gRPC code from .proto definitions.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(asynchronix_loom)', 'cfg(asynchronix_grpc_codegen)'] } unexpected_cfgs = { level = "warn", check-cfg = ['cfg(asynchronix_loom)', 'cfg(asynchronix_grpc_codegen)'] }
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[[test]] [[test]]
name = "integration" name = "integration"
path = "tests/tests.rs" path = "tests/tests.rs"

View File

@ -15,7 +15,7 @@
//! │ Assembly │ //! │ Assembly │
//! │ ┌──────────┐ ┌──────────┐ │ //! │ ┌──────────┐ ┌──────────┐ │
//! PPS │ │ │ coil currents │ │ │position //! PPS │ │ │ coil currents │ │ │position
//! Pulse rate ●───────▶│──▶│ Driver ├───────────────▶│ Motor ├──▶│─────────▶ //! Pulse rate ●───────►│──►│ Driver ├───────────────►│ Motor ├──►│─────────►
//! (±freq)│ │ │ (IA, IB) │ │ │(0:199) //! (±freq)│ │ │ (IA, IB) │ │ │(0:199)
//! │ └──────────┘ └──────────┘ │ //! │ └──────────┘ └──────────┘ │
//! └──────────────────────────────────────────────┘ //! └──────────────────────────────────────────────┘

View File

@ -12,9 +12,9 @@
//! ┌─────────────────────────────────────────────┐ //! ┌─────────────────────────────────────────────┐
//! │ (≥0) │ //! │ (≥0) │
//! │ ┌────────────┐ │ //! │ ┌────────────┐ │
//! └───│ │ │ //! └───│ │ │
//! added volume │ Water tank ├────┐ │ //! added volume │ Water tank ├────┐ │
//! Water fill ●───────────────────│ │ │ │ //! Water fill ●───────────────────│ │ │ │
//! (>0) └────────────┘ │ │ //! (>0) └────────────┘ │ │
//! │ │ //! │ │
//! water sense │ │ //! water sense │ │
@ -22,9 +22,9 @@
//! │ (empty|not empty) │ //! │ (empty|not empty) │
//! │ │ //! │ │
//! │ ┌────────────┐ ┌────────────┐ │ //! │ ┌────────────┐ ┌────────────┐ │
//! brew time └───│ │ command │ │ │ //! brew time └───│ │ command │ │ │
//! Brew time dial ●───────────────────▶│ Controller ├─────────▶│ Water pump ├───┘ //! Brew time dial ●───────────────────►│ Controller ├─────────►│ Water pump ├───┘
//! (>0) ┌───│ │ (on|off) │ │ //! (>0) ┌───│ │ (on|off) │ │
//! │ └────────────┘ └────────────┘ //! │ └────────────┘ └────────────┘
//! trigger │ //! trigger │
//! Brew command ●───────────────┘ //! Brew command ●───────────────┘

View File

@ -11,7 +11,7 @@
//! │ Simulation │ //! │ Simulation │
//! ┌────────────┐ ┌────────────┐ │ ┌──────────┐ │ //! ┌────────────┐ ┌────────────┐ │ ┌──────────┐ │
//! │ │ UDP │ │ message │ message │ │ message │ ┌─────────────┐ //! │ │ UDP │ │ message │ message │ │ message │ ┌─────────────┐
//! │ UDP Client ├─────────▶│ UDP Server ├──────────▶├─────────▶│ Listener ├─────────▶├──▶│ EventBuffer │ //! │ UDP Client ├─────────►│ UDP Server ├──────────►├─────────►│ Listener ├─────────►├──►│ EventBuffer │
//! │ │ message │ │ │ │ │ │ └─────────────┘ //! │ │ message │ │ │ │ │ │ └─────────────┘
//! └────────────┘ └────────────┘ │ └──────────┘ │ //! └────────────┘ └────────────┘ │ └──────────┘ │
//! └────────────────────────────────┘ //! └────────────────────────────────┘

View File

@ -8,22 +8,22 @@
//! ```text //! ```text
//! ┌────────┐ //! ┌────────┐
//! │ │ //! │ │
//! ┌───▶│ Load ├───▶ Power //! ┌───►│ Load ├───► Power
//! │ │ │ //! │ │ │
//! │ └────────┘ //! │ └────────┘
//! │ //! │
//! │ ┌────────┐ //! │ ┌────────┐
//! │ │ │ //! │ │ │
//! ├───▶│ Load ├───▶ Power //! ├───►│ Load ├───► Power
//! │ │ │ //! │ │ │
//! │ └────────┘ //! │ └────────┘
//! │ //! │
//! │ ┌────────┐ //! │ ┌────────┐
//! ┌──────────┐ voltage │ │ │ //! ┌──────────┐ voltage │ │ │
//! Voltage setting ●────▶│ │◀────────────┴───▶│ Load ├───▶ Power //! Voltage setting ●────►│ │◄────────────┴───►│ Load ├───► Power
//! │ Power │ current │ │ //! │ Power │ current │ │
//! │ supply │ └────────┘ //! │ supply │ └────────┘
//! │ ├─────────────────────────────── Total power //! │ ├─────────────────────────────── Total power
//! └──────────┘ //! └──────────┘
//! ``` //! ```
use asynchronix::model::Model; use asynchronix::model::Model;

View File

@ -9,7 +9,7 @@
//! ```text //! ```text
//! ┌──────────┐ ┌──────────┐ //! ┌──────────┐ ┌──────────┐
//! PPS │ │ coil currents │ │ position //! PPS │ │ coil currents │ │ position
//! Pulse rate ●─────────▶│ Driver ├───────────────▶│ Motor ├──────────▶ //! Pulse rate ●─────────►│ Driver ├───────────────►│ Motor ├──────────►
//! (±freq) │ │ (IA, IB) │ │ (0:199) //! (±freq) │ │ (IA, IB) │ │ (0:199)
//! └──────────┘ └──────────┘ //! └──────────┘ └──────────┘
//! ``` //! ```

View File

@ -75,7 +75,7 @@
//! ```text //! ```text
//! ┌────────────┐ //! ┌────────────┐
//! │ │ //! │ │
//! Input ●───────▶│ Multiplier ├───────▶ Output //! Input ●───────►│ Multiplier ├───────► Output
//! f64 │ │ f64 //! f64 │ │ f64
//! └────────────┘ //! └────────────┘
//! ``` //! ```
@ -156,13 +156,13 @@
//! ```text //! ```text
//! ┌────────────┐ //! ┌────────────┐
//! │ │ //! │ │
//! ┌──│ Delay ├──┐ //! ┌──│ Delay ├──┐
//! ┌────────────┐ │ │ │ │ ┌────────────┐ //! ┌────────────┐ │ │ │ │ ┌────────────┐
//! │ │ │ └────────────┘ │ │ │ //! │ │ │ └────────────┘ │ │ │
//! Input ●──▶│ Multiplier ├───┤ ├──▶│ Delay ├──▶ Output //! Input ●──►│ Multiplier ├───┤ ├──►│ Delay ├──► Output
//! │ │ │ ┌────────────┐ │ │ │ //! │ │ │ ┌────────────┐ │ │ │
//! └────────────┘ │ │ │ │ └────────────┘ //! └────────────┘ │ │ │ │ └────────────┘
//! └──│ Multiplier ├──┘ //! └──│ Multiplier ├──┘
//! │ │ //! │ │
//! └────────────┘ //! └────────────┘
//! ``` //! ```
@ -406,6 +406,8 @@
//! * the [`time`] module discusses in particular the monotonic timestamp format //! * the [`time`] module discusses in particular the monotonic timestamp format
//! used for simulations ([`time::MonotonicTime`]). //! used for simulations ([`time::MonotonicTime`]).
#![warn(missing_docs, missing_debug_implementations, unreachable_pub)] #![warn(missing_docs, missing_debug_implementations, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))]
#![cfg_attr(docsrs, doc(cfg_hide(feature = "dev-hooks")))]
pub(crate) mod channel; pub(crate) mod channel;
pub(crate) mod executor; pub(crate) mod executor;