cairo-lang-doc 2.18.0

A collection of documentation processing utilities for the Cairo programming language.
Documentation
//! > Documentation submodules

//! > test_runner_name
documentation_test_runner

//! > cairo_project.toml
[crate_roots]
hello = "src"

//! > cairo_code
//! This is a testing crate file. It's for the tests purposes only.
//! ```
//!   let a = 5;
//! ```
//! This is also testing crate. After the code example.

//! We don't take responsibility for compiling this file.
//! So don't even try.
//!
//! # Test markdown headings
//!
//! ## One after another
//!
//! ### ```fn code_can_be_heading()```
//!
//! #### [link can be heading](URL)

/// This one is just a prefix comment for a module.
/// ```rust
///   let a = String::from("This also works fine");
/// ```
/// As mentioned above.
mod cairo_submodule_code;

/// Main function.
/// Uses [cairo_submodule_code::inner_sub_module].
fn main() {
    //! Empty code example.
    //! ```rust
    //! ```
    println!("Hello Cairo!");
}

//! > cairo_submodule_code
//! This is a submodule regarding the module_level_comments.

//! It's used to make sure crate / module level comments are parsed in a correct way.
//! Testing purposes only!

/// [super::main]
mod inner_sub_module {
    //! This comment just proves that it won't be considered as a file-module comment. It just
    //! refers to the inner_sub_module
    /// Hello function inside the inner module.
    fn hello() {
        println!("Hello!");
    }
}

//! > Item signature #1

//! > Item documentation #1
This is a testing crate file. It's for the tests purposes only.
```cairo
  let a = 5;
```

This is also testing crate. After the code example.
We don't take responsibility for compiling this file.
So don't even try.
# Test markdown headings
## One after another
### `fn code_can_be_heading()`
#### [link can be heading](URL)

//! > Item documentation tokens #1
Content("This is a testing crate file. It's for the tests purposes only.")
Content("\n")
Content("```cairo\n")
Content("  let a = 5;\n")
Content("```\n")
Content("\n")
Content("This is also testing crate. After the code example.")
Content("\n")
Content("We don't take responsibility for compiling this file.")
Content("\n")
Content("So don't even try.")
Content("\n")
Content("# ")
Content("Test markdown headings")
Content("\n")
Content("## ")
Content("One after another")
Content("\n")
Content("### ")
Content("`fn code_can_be_heading()`")
Content("\n")
Content("#### ")
CommentLinkToken { label: "link can be heading", path: Some("URL"), md_link: MarkdownLink { link_span: TextSpan { start: TextOffset(TextWidth(300)), end: TextOffset(TextWidth(326)) }, dest_span: Some(TextSpan { start: TextOffset(TextWidth(322)), end: TextOffset(TextWidth(325)) }), dest_text: Some("URL") } }

//! > Item signature #2

//! > Item documentation #2
This is a submodule regarding the module_level_comments.
It's used to make sure crate / module level comments are parsed in a correct way.
Testing purposes only! This one is just a prefix comment for a module.
```rust
  let a = String::from("This also works fine");
```

As mentioned above.

//! > Item documentation tokens #2
Content("This is a submodule regarding the module_level_comments.")
Content("\n")
Content("It's used to make sure crate / module level comments are parsed in a correct way.")
Content("\n")
Content("Testing purposes only!")
Content(" ")
Content("This one is just a prefix comment for a module.")
Content("\n")
Content("```rust\n")
Content("  let a = String::from(\"This also works fine\");\n")
Content("```\n")
Content("\n")
Content("As mentioned above.")

//! > Item signature #3

//! > Item documentation #3
[super::main] This comment just proves that it won't be considered as a file-module comment. It just
refers to the inner_sub_module

//! > Item documentation tokens #3
CommentLinkToken { label: "super::main", path: None, md_link: MarkdownLink { link_span: TextSpan { start: TextOffset(TextWidth(0)), end: TextOffset(TextWidth(13)) }, dest_span: Some(TextSpan { start: TextOffset(TextWidth(1)), end: TextOffset(TextWidth(12)) }), dest_text: Some("super::main") } }
Content(" ")
Content("This comment just proves that it won't be considered as a file-module comment. It just")
Content("\n")
Content("refers to the inner_sub_module")

//! > Item signature #4
fn hello()

//! > Item documentation #4
Hello function inside the inner module.

//! > Item documentation tokens #4
Content("Hello function inside the inner module.")

//! > Item signature #5
fn main()

//! > Item documentation #5
Main function.
Uses [cairo_submodule_code::inner_sub_module]. Empty code example.
```rust
```

//! > Item documentation tokens #5
Content("Main function.")
Content("\n")
Content("Uses ")
CommentLinkToken { label: "cairo_submodule_code::inner_sub_module", path: None, md_link: MarkdownLink { link_span: TextSpan { start: TextOffset(TextWidth(20)), end: TextOffset(TextWidth(60)) }, dest_span: Some(TextSpan { start: TextOffset(TextWidth(21)), end: TextOffset(TextWidth(59)) }), dest_text: Some("cairo_submodule_code::inner_sub_module") } }
Content(".")
Content(" ")
Content("Empty code example.")
Content("\n")
Content("```rust\n")
Content("```")