Struct syntax::ast::MetaItem [−][src]
pub struct MetaItem { pub ident: Path, pub node: MetaItemKind, pub span: Span, }
A spanned compile-time attribute item.
E.g. #[test]
, #[derive(..)]
, #[rustfmt::skip]
or #[feature = "foo"]
Fields
ident: Path
node: MetaItemKind
span: Span
Methods
impl MetaItem
[src]
impl MetaItem
pub fn name(&self) -> Name
[src]
pub fn name(&self) -> Name
pub fn value_str(&self) -> Option<Symbol>
[src]
pub fn value_str(&self) -> Option<Symbol>
pub fn meta_item_list(&self) -> Option<&[NestedMetaItem]>
[src]
pub fn meta_item_list(&self) -> Option<&[NestedMetaItem]>
pub fn is_word(&self) -> bool
[src]
pub fn is_word(&self) -> bool
pub fn span(&self) -> Span
[src]
pub fn span(&self) -> Span
pub fn check_name(&self, name: &str) -> bool
[src]
pub fn check_name(&self, name: &str) -> bool
pub fn is_value_str(&self) -> bool
[src]
pub fn is_value_str(&self) -> bool
pub fn is_meta_item_list(&self) -> bool
[src]
pub fn is_meta_item_list(&self) -> bool
pub fn is_scoped(&self) -> Option<Ident>
[src]
pub fn is_scoped(&self) -> Option<Ident>
Trait Implementations
impl Clone for MetaItem
[src]
impl Clone for MetaItem
fn clone(&self) -> MetaItem
[src]
fn clone(&self) -> MetaItem
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Encodable for MetaItem
[src]
impl Encodable for MetaItem
impl Decodable for MetaItem
[src]
impl Decodable for MetaItem
impl Debug for MetaItem
[src]
impl Debug for MetaItem
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ToTokens for MetaItem
[src]
impl ToTokens for MetaItem