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
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 PartialEq for MetaItem
[src]
impl PartialEq for MetaItem
fn eq(&self, other: &MetaItem) -> bool
[src]
fn eq(&self, other: &MetaItem) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MetaItem) -> bool
[src]
fn ne(&self, other: &MetaItem) -> bool
This method tests for !=
.
impl Eq for MetaItem
[src]
impl Eq for MetaItem
impl Encodable for MetaItem
[src]
impl Encodable for MetaItem
impl Decodable for MetaItem
[src]
impl Decodable for MetaItem
impl Hash for MetaItem
[src]
impl Hash for MetaItem
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
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