Function doc

Source
pub fn doc(attrs: &[Attribute]) -> Result<Option<LitStr>>
Expand description

Lookups for the standard Rust #[doc] attributes in the given syn::Attributes and parses their text as syn::LitStr with a little normalization.

§Errors

  • If parsing text from #[doc] attribute fails.
  • If #[doc] doesn’t contain text.