Enum rustdoc::clean::Attribute [] [src]

pub enum Attribute {
    Word(String),
    List(StringVec<Attribute>),
    NameValue(StringString),
}
Unstable (rustdoc)

Variants

Word(String)
Unstable (rustdoc)
List(StringVec<Attribute>)
Unstable (rustdoc)
NameValue(StringString)
Unstable (rustdoc)

Trait Implementations

impl AttrMetaMethods for Attribute
[src]

fn name(&self) -> InternedString

Retrieve the name of the meta item, e.g. foo in #[foo], #[foo="bar"] and #[foo(bar)] Read more

fn value_str(&self) -> Option<InternedString>

Gets the string value if self is a MetaItemKind::NameValue variant containing a string, otherwise None. Read more

fn meta_item_list<'a>(&'a self) -> Option<&'a [P<MetaItem>]>

Gets a list of inner meta items from a list MetaItem type.

fn span(&self) -> Span

fn check_name(&self, name: &str) -> bool

Derived Implementations

impl Debug for Attribute
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for Attribute
[src]

fn eq(&self, __arg_0: &Attribute) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Attribute) -> bool

This method tests for !=.

impl Decodable for Attribute
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Attribute, __D::Error>

impl Encodable for Attribute
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Clone for Attribute
[src]

fn clone(&self) -> Attribute

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more