mcp_commune/prelude.rs
1//! Prelude module for the Commune project.
2//!
3//! This module re-exports commonly used items from various parts of the crate,
4//! as well as from external dependencies. Using `use mcp_commune::prelude::*;`
5//! will import these items into scope, making it easier to work with the Commune library.
6
7// Re-export items from the crate's modules
8pub use crate::{client::*, error::*, peer::*, server::*, tool::{async_fn_executor, sync_fn_executor}};
9
10// Re-export items from external dependencies
11pub use mcp_sdk_rs::types::LoggingLevel;
12
13/// The prelude module.
14///
15/// This module is intended to be glob-imported (`use mcp_commune::prelude::*;`) to bring
16/// commonly used items into scope. It includes re-exports from various parts of the
17/// Commune crate as well as selected items from external dependencies.
18///
19/// # Example
20///
21/// ```
22/// use mcp_commune::prelude::*;
23///
24/// // Now you can use items from client, error, peer, and server modules
25/// // as well as LoggingLevel from mcp_sdk_rs without additional imports.
26/// ```
27///
28/// # Contents
29///
30/// - All items from the `client` module
31/// - All items from the `error` module
32/// - All items from the `peer` module
33/// - All items from the `server` module
34/// - `LoggingLevel` from `mcp_sdk_rs::types`
35///
36/// By using this prelude, you can reduce the number of explicit imports needed
37/// when working with the Commune library, leading to cleaner and more concise code.
38pub use super::*;