How to Write a Crate-Level Documentation (//! comments)

Write crate-level documentation by adding `//!` comments at the top of your library's root file.

Place //! comments at the very top of your library's root file (usually src/lib.rs) to write crate-level documentation that appears in the generated docs.

//! # Crate Name
//!
//! This is the crate-level documentation.
//! It appears at the top of the generated documentation page.

pub fn hello() {
    println!("Hello");
}

Run cargo doc --open to view the rendered documentation in your browser.