Skip to main content

Comments

Trait Comments 

Source
pub trait Comments {
    // Required methods
    fn comment(text: &str) -> String;
    fn doc(text: &str) -> String;
}
Expand description

How the language writes comments.

Required Methods§

Source

fn comment(text: &str) -> String

text as a one-line comment (no line break).

Source

fn doc(text: &str) -> String

text as a one-line doc comment on what follows.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§