Struct doku::toml::CommentsStyle
source · pub struct CommentsStyle {
pub separator: String,
}Expand description
Determines the comments style.
Fields§
§separator: StringString to use as comment separator
use doku::Document;
#[derive(Document)]
struct Person {
/// First name
name: String,
}
let fmt = doku::toml::Formatting {
comments_style: doku::toml::CommentsStyle { separator: "//".to_owned() },
..Default::default()
};
let doc = doku::to_toml_fmt::<Person>(&fmt);
doku::assert_doc!(r#"
// First name
name = "string"
"#, doc);Trait Implementations§
source§impl Clone for CommentsStyle
impl Clone for CommentsStyle
source§fn clone(&self) -> CommentsStyle
fn clone(&self) -> CommentsStyle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CommentsStyle
impl Debug for CommentsStyle
source§impl Default for CommentsStyle
impl Default for CommentsStyle
source§impl<'de> Deserialize<'de> for CommentsStyle
impl<'de> Deserialize<'de> for CommentsStyle
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more