ndn_transport/
lib.rs

1//! # ndn-transport -- Face abstraction and transport layer
2//!
3//! Provides the async face abstraction over which NDN packets are sent and
4//! received, plus supporting types for face management and framing.
5//!
6//! ## Key types
7//!
8//! - [`Face`] trait -- async `send`/`recv` interface implemented by all transports.
9//! - [`FaceId`] / [`FaceKind`] -- face identity and classification (UDP, TCP, etc.).
10//! - [`FaceTable`] / [`ErasedFace`] -- runtime registry of type-erased faces.
11//! - [`StreamFace`] -- generic `AsyncRead`+`AsyncWrite` face (TCP, Unix, etc.).
12//! - [`TlvCodec`] -- `tokio_util::codec` framing for TLV streams.
13//! - [`RawPacket`] -- thin wrapper pairing raw `Bytes` with a source [`FaceId`].
14//! - [`CongestionController`] -- per-face congestion window management.
15//!
16//! ## Feature flags
17//!
18//! - **`serde`** -- derives `Serialize`/`Deserialize` on select types.
19
20#![allow(missing_docs)]
21
22pub mod any_map;
23pub mod congestion;
24pub mod face;
25pub mod face_event;
26pub mod face_pair_table;
27pub mod face_table;
28pub mod forwarding;
29pub mod mac_addr;
30pub mod raw_packet;
31pub mod stream_face;
32pub mod tlv_codec;
33
34pub use any_map::AnyMap;
35pub use congestion::CongestionController;
36pub use face::{Face, FaceAddr, FaceError, FaceId, FaceKind, FacePersistency, FaceScope, LinkType};
37pub use face_event::FaceEvent;
38pub use face_pair_table::FacePairTable;
39pub use face_table::{ErasedFace, FaceInfo, FaceTable};
40pub use forwarding::{ForwardingAction, NackReason};
41pub use mac_addr::MacAddr;
42pub use raw_packet::RawPacket;
43pub use stream_face::StreamFace;
44pub use tlv_codec::TlvCodec;