Skip to main content

code

Function code 

Source
pub fn code() -> CodeBuilder
Expand description

Create a new code block object builder.

code()
    .source("fn main() {\n    println!(\"hello\");\n}")
    .syntax(Syntax::Rust)
    .line_numbers(true)
    .build(),