Skip to content

Commit 7e9e775

Browse files
committed
Documentation improvements
Signed-off-by: Matt Johnston <[email protected]>
1 parent 1897bff commit 7e9e775

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

mctp-estack/src/lib.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
* Copyright (c) 2024-2025 Code Construct
44
*/
55

6-
//! MCTP Stack
6+
//! # MCTP Stack
77
//!
88
//! This crate provides a MCTP stack that can be embedded in other programs
9-
//! or devices. A [`Stack`] handles MCTP message formatting and parsing, independent
10-
//! of any particular MCTP transport binding.
9+
//! or devices.
1110
//!
1211
//! A [`Router`] object lets programs use a [`Stack`] with
13-
//! MCTP transport binding links. Each "port" handles transmitting and receiving
12+
//! MCTP transport binding links. Each *Port* handles transmitting and receiving
1413
//! packets independently. Messages destined for the stack's own EID will
1514
//! be passed to applications.
1615
//!
1716
//! Applications can create [`router::RouterAsyncListener`] and [`router::RouterAsyncReqChannel`]
1817
//! instances to communicate over MCTP. Those implement the standard [`mctp` crate](mctp)
1918
//! async traits.
2019
//!
20+
//! The IO-less [`Stack`] handles MCTP message formatting and parsing, independent
21+
//! of any particular MCTP transport binding.
22+
//!
2123
//! ## Configuration
2224
//!
2325
//! `mctp-estack` uses fixed sizes to be suitable on no-alloc platforms.
@@ -30,6 +32,8 @@
3032

3133
/// Re-exported so that callers can use the same `heapless` version.
3234
///
35+
/// `heapless::Vec` is currently an argument of `send_fill()` in transports.
36+
///
3337
/// TODO: will be replaced with something else, maybe `heapless::VecView` once
3438
/// released.
3539
pub use heapless::Vec;
@@ -141,6 +145,9 @@ type Header = libmctp::base_packet::MCTPTransportHeader<[u8; HEADER_LEN]>;
141145
#[derive(Debug)]
142146
pub struct ReceiveHandle(usize);
143147

148+
/// Low level MCTP stack.
149+
///
150+
/// This is an IO-less MCTP stack, independent of any particular transport.
144151
#[derive(Debug)]
145152
pub struct Stack {
146153
own_eid: Eid,

mctp/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![forbid(unsafe_code)]
1111
#![warn(missing_docs)]
1212

13-
//! Management Component Transport Protocol (MCTP)
13+
//! # Management Component Transport Protocol (MCTP)
1414
//!
1515
//! This crate provides common types and traits for MCTP.
1616
//! Transport implementations can implement [`ReqChannel`] and [`Listener`] to

0 commit comments

Comments
 (0)