Skip to main content

mqtt_topic_engine/
lib.rs

1//! # MQTT Topic Engine
2//!
3#![doc = include_str!("../README.md")]
4//!
5#![warn(missing_docs)]
6
7// Public modules
8pub mod cache_strategy;
9pub mod error;
10pub mod qos;
11pub mod topic_match;
12pub mod topic_pattern_item;
13pub mod topic_pattern_path;
14
15// Router modules (optional)
16#[cfg(feature = "router")]
17pub mod topic_matcher;
18#[cfg(feature = "router")]
19pub mod topic_router;
20
21// Tests modules - вони залишаються приватними
22#[cfg(all(test, feature = "router"))]
23mod topic_matcher_tests;
24#[cfg(test)]
25mod topic_pattern_item_tests;
26#[cfg(test)]
27mod topic_pattern_path_tests;
28
29// Re-export main types for convenience
30pub use cache_strategy::CacheStrategy;
31// Router-specific re-exports
32#[cfg(feature = "router")]
33pub use error::{MatcherResult, RouterResult};
34pub use error::{PatternResult, TopicError, TopicResult, limits, validation};
35pub use qos::QoS;
36pub use topic_match::{TopicMatch, TopicPath};
37#[cfg(feature = "router")]
38pub use topic_matcher::TopicMatcherError;
39pub use topic_pattern_item::{TopicPatternError, TopicPatternItem};
40pub use topic_pattern_path::{TopicFormatError, TopicPatternPath};
41#[cfg(feature = "router")]
42pub use topic_router::{SubscriptionId, TopicRouter, TopicRouterError};