#[non_exhaustive]pub enum DocAttribute<'a> {
LitStr(Cow<'a, LitStr>),
IncludeStr(IncludeStrMacro<'a>),
Inline,
Other(Cow<'a, Attribute>),
}
Expand description
A Doc Attribute
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LitStr(Cow<'a, LitStr>)
#[doc = "Hello World"]
IncludeStr(IncludeStrMacro<'a>)
#[doc = include_str!("path/to/file")]
Inline
#[doc(inline)]
Other(Cow<'a, Attribute>)
More Doc Attributes will be added
Implementations§
Source§impl DocAttribute<'static>
impl DocAttribute<'static>
Sourcepub fn parse_inner(input: ParseStream<'_>) -> Result<Vec<DocAttribute<'static>>>
pub fn parse_inner(input: ParseStream<'_>) -> Result<Vec<DocAttribute<'static>>>
Parses all attributes then filters out the doc attributes and parses them
§Returns
A Vec of DocAttributes
Source§impl DocAttribute<'_>
impl DocAttribute<'_>
Trait Implementations§
Source§impl<'a> Clone for DocAttribute<'a>
impl<'a> Clone for DocAttribute<'a>
Source§fn clone(&self) -> DocAttribute<'a>
fn clone(&self) -> DocAttribute<'a>
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<'a> Debug for DocAttribute<'a>
impl<'a> Debug for DocAttribute<'a>
Source§impl ToTokens for DocAttribute<'_>
impl ToTokens for DocAttribute<'_>
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Source§impl<'a> TryFrom<&'a Attribute> for DocAttribute<'a>
impl<'a> TryFrom<&'a Attribute> for DocAttribute<'a>
Auto Trait Implementations§
impl<'a> Freeze for DocAttribute<'a>
impl<'a> RefUnwindSafe for DocAttribute<'a>
impl<'a> !Send for DocAttribute<'a>
impl<'a> !Sync for DocAttribute<'a>
impl<'a> Unpin for DocAttribute<'a>
impl<'a> UnwindSafe for DocAttribute<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.