Struct rustdoc::clean::types::Attributes [−][src]
pub(crate) struct Attributes {
pub(crate) doc_strings: Vec<DocFragment>,
pub(crate) other_attrs: Vec<Attribute>,
}
Expand description
The attributes on an Item
, including attributes like #[derive(...)]
and #[inline]
,
as well as doc comments.
Fields
doc_strings: Vec<DocFragment>
other_attrs: Vec<Attribute>
Implementations
pub(crate) fn lists(&self, name: Symbol) -> ListAttributesIter<'_>ⓘNotable traits for ListAttributesIter<'a>impl<'a> Iterator for ListAttributesIter<'a> type Item = NestedMetaItem;
impl<'a> Iterator for ListAttributesIter<'a> type Item = NestedMetaItem;
pub(crate) fn from_ast(
attrs: &[Attribute],
additional_attrs: Option<(&[Attribute], DefId)>
) -> Attributes
Finds the doc
attribute as a NameValue and returns the corresponding
value found.
Return the doc-comments on this item, grouped by the module they came from.
The module can be different if this is a re-export with added documentation.
Finds all doc
attributes as NameValues and returns their corresponding values, joined
with newlines.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Attributes
impl !Send for Attributes
impl !Sync for Attributes
impl Unpin for Attributes
impl !UnwindSafe for Attributes
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes