From 5a23e6b3ad655b15b412720ab81b0508866bebce Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 27 Jun 2026 18:28:52 +0800 Subject: docs: improve documentation, mark internal items as `#[doc(hidden)]` Add module-level docs for the hook system, enhance doc examples for macros with usage syntax, fix typos in cross-references, and hide internal debugging macros and mock types from public documentation --- mingling_core/src/debug.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mingling_core/src/debug.rs') diff --git a/mingling_core/src/debug.rs b/mingling_core/src/debug.rs index f92cd3d..4865016 100644 --- a/mingling_core/src/debug.rs +++ b/mingling_core/src/debug.rs @@ -1,4 +1,5 @@ #[macro_export] +#[doc(hidden)] /// A macro that only executes the given expressions when the `debug` feature is enabled. /// If the feature is not enabled, the expressions are compiled away. macro_rules! only_debug { @@ -11,6 +12,7 @@ macro_rules! only_debug { } #[macro_export] +#[doc(hidden)] /// Logs a message at the trace level, but only if the `debug` feature is enabled. /// Delegates to `log::trace!` internally. macro_rules! trace { @@ -22,6 +24,7 @@ macro_rules! trace { } #[macro_export] +#[doc(hidden)] /// Logs a message at the debug level, but only if the `debug` feature is enabled. /// Delegates to `log::debug!` internally. macro_rules! debug { @@ -33,6 +36,7 @@ macro_rules! debug { } #[macro_export] +#[doc(hidden)] /// Logs a message at the info level, but only if the `debug` feature is enabled. /// Delegates to `log::info!` internally. macro_rules! info { @@ -44,6 +48,7 @@ macro_rules! info { } #[macro_export] +#[doc(hidden)] /// Logs a message at the warn level, but only if the `debug` feature is enabled. /// Delegates to `log::warn!` internally. macro_rules! warn { @@ -55,6 +60,7 @@ macro_rules! warn { } #[macro_export] +#[doc(hidden)] /// Logs a message at the error level, but only if the `debug` feature is enabled. /// Delegates to `log::error!` internally. macro_rules! error { @@ -66,6 +72,7 @@ macro_rules! error { } #[cfg(feature = "debug")] +#[doc(hidden)] pub fn init_env_logger() { let mut log_path = std::env::current_exe() .expect("Failed to get current executable path") -- cgit