Struct doku::json::CommentsStyle
source · pub struct CommentsStyle {
pub separator: String,
}
Expand description
Determines the comments style.
Fields§
§separator: String
String to use as comment separator
use doku::Document;
#[derive(Document)]
struct Person {
/// First name
name: String,
}
let fmt = doku::json::Formatting {
comments_style: doku::json::CommentsStyle { separator: "#".to_owned() },
..Default::default()
};
let doc = doku::to_json_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
Auto Trait Implementations§
impl RefUnwindSafe for CommentsStyle
impl Send for CommentsStyle
impl Sync for CommentsStyle
impl Unpin for CommentsStyle
impl UnwindSafe for CommentsStyle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more