Struct syntax::ast::MetaItem
[−]
[src]
pub struct MetaItem {
pub name: Name,
pub node: MetaItemKind,
pub span: Span,
}🔬 This is a nightly-only experimental API. (
rustc_private)A spanned compile-time attribute item.
E.g. #[test], #[derive(..)] or #[feature = "foo"]
Fields
name: Name
🔬 This is a nightly-only experimental API. (
rustc_private)node: MetaItemKind
🔬 This is a nightly-only experimental API. (
rustc_private)span: Span
🔬 This is a nightly-only experimental API. (
rustc_private)Methods
impl MetaItem[src]
fn name(&self) -> Name
🔬 This is a nightly-only experimental API. (
rustc_private)fn value_str(&self) -> Option<Symbol>
🔬 This is a nightly-only experimental API. (
rustc_private)fn meta_item_list(&self) -> Option<&[NestedMetaItem]>
🔬 This is a nightly-only experimental API. (
rustc_private)fn is_word(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private)fn span(&self) -> Span
🔬 This is a nightly-only experimental API. (
rustc_private)fn check_name(&self, name: &str) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private)fn is_value_str(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private)fn is_meta_item_list(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private)Trait Implementations
impl Clone for MetaItem[src]
fn clone(&self) -> MetaItem
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
impl PartialEq for MetaItem[src]
fn eq(&self, __arg_0: &MetaItem) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &MetaItem) -> bool
This method tests for !=.
impl Eq for MetaItem[src]
impl Encodable for MetaItem[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Decodable for MetaItem[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<MetaItem, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Hash for MetaItem[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.