pub struct DocComment {
pub summary: String,
pub description: Option<String>,
pub examples: Vec<String>,
pub sections: Vec<DocSection>,
}Expand description
ドキュメントコメント
Fields§
§summary: Stringメインの説明文
description: Option<String>詳細な説明
examples: Vec<String>@example セクション
sections: Vec<DocSection>その他のセクション
Implementations§
Source§impl DocComment
impl DocComment
Sourcepub fn empty() -> DocComment
pub fn empty() -> DocComment
空のドキュメントコメント
Sourcepub fn summary(text: impl Into<String>) -> DocComment
pub fn summary(text: impl Into<String>) -> DocComment
単純なサマリーのみのドキュメント
Sourcepub fn parse(doc: &str) -> DocComment
pub fn parse(doc: &str) -> DocComment
Rustのdocコメントからパース
Sourcepub fn to_inline_jsdoc(&self) -> String
pub fn to_inline_jsdoc(&self) -> String
単一行JSDocコメント
Trait Implementations§
Source§impl Clone for DocComment
impl Clone for DocComment
Source§fn clone(&self) -> DocComment
fn clone(&self) -> DocComment
Returns a duplicate 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 DocComment
impl Debug for DocComment
Source§impl<'de> Deserialize<'de> for DocComment
impl<'de> Deserialize<'de> for DocComment
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocComment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocComment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DocComment
impl Serialize for DocComment
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DocComment
impl RefUnwindSafe for DocComment
impl Send for DocComment
impl Sync for DocComment
impl Unpin for DocComment
impl UnwindSafe for DocComment
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