Trait syn_ext::ext::MetaExt[][src]

pub trait MetaExt {
    fn is_path(&self) -> bool;
fn is_list(&self) -> bool;
fn is_name_value(&self) -> bool;
fn is_doc(&self) -> bool;
fn promote_to_list(&mut self, paren: Paren) -> Result<&mut MetaList>;
fn list(&self) -> Result<&MetaList>;
fn list_mut(&mut self) -> Result<&mut MetaList>;
fn name_value(&self) -> Result<&MetaNameValue>;
fn name_value_mut(&mut self) -> Result<&mut MetaNameValue>;
fn doc(&self) -> Result<String>; }
Expand description

Extension for syn::Meta

Required methods

Returns true if self matches syn::Meta::Path

Returns true if self matches syn::Meta::List

Returns true if self matches syn::Meta::NameValue

Returns true if the content matches doc = <string lit>

Promotes to empty syn::Meta::List with given paren if syn::Meta::Path

A syn::Meta::Path value can be regarded as an empty syn::Meta::List. promote means converting syn::Meta::Path to an actual empty syn::Meta::List.

Returns syn::MetaList of syn::Meta::List; Otherwise Err

Returns syn::MetaList of syn::Meta::List; Otherwise Err

Returns syn::MetaNameValue of syn::Meta::NameValue; Otherwise Err

Returns syn::MetaNameValue of syn::Meta::NameValue; Otherwise Err

Returns content of doc = <content>

Implementations on Foreign Types

Implementors