When I have a method, should the first line of the documentation comment be a summary, or can I also directly start writing a long text? I assume the following is bad style?
/// This is `Foo`
///
/// Some longer text goes here.
trait Foo {
/// Should this have a headline, or can I directly write a lot of text here
/// because there is no overview on all of `Foo`'s methods, so it's not a
/// problem if this text is looooooooong.
fn foo(&self);
}
But this currently this isn't the case for methods, right? I think rustfmt currently doesn't create an overview where there is only one line shown. (But I guess it could exist in future.)
Oh, I'm wrong. When I do a search, for example, it will only show one line.