我正在嘗試爲我在Rust中編寫的項目編寫文檔。其中一個文檔需要使用regex::Regex。下面是我想要寫的文檔: /// Return a list of the offsets of the tokens in `s`, as a sequence of `(start, end)`
/// tuples, by splitting the string at each successive
rustdoc允許您通過包括每個行之前的文檔註釋記錄結構域和枚舉變量: enum Choices {
/// The first choice.
First,
/// The second choice.
Second,
}
struct Person {
/// The person's name.
name: String,