How to Use #[doc(hidden)] to Hide Items from Documentation

Use the #[doc(hidden)] attribute above an item to hide it from generated Rust documentation while keeping it accessible in code.

Add the #[doc(hidden)] attribute directly above the item definition to exclude it from generated documentation while keeping it accessible in code.

#[doc(hidden)]
pub fn internal_helper() {
    // Implementation remains public for code, hidden from docs
}

This attribute tells rustdoc to skip rendering the item, effectively hiding internal implementation details from users while maintaining the public API for compilation.