Trait devise::FromMeta

source ·
pub trait FromMeta: Sized {
    // Required method
    fn from_meta(meta: &MetaItem) -> Result<Self, Diagnostic>;

    // Provided methods
    fn from_attr(attr: &Attribute) -> Result<Self, Diagnostic> { ... }
    fn from_attrs(
        name: &str,
        attrs: &[Attribute]
    ) -> Result<Vec<Self, Global>, Diagnostic> { ... }
    fn one_from_attrs(
        name: &str,
        attrs: &[Attribute]
    ) -> Result<Option<Self>, Diagnostic> { ... }
    fn default() -> Option<Self> { ... }
}

Required Methods§

Provided Methods§

source

fn from_attr(attr: &Attribute) -> Result<Self, Diagnostic>

source

fn from_attrs( name: &str, attrs: &[Attribute] ) -> Result<Vec<Self, Global>, Diagnostic>

source

fn one_from_attrs( name: &str, attrs: &[Attribute] ) -> Result<Option<Self>, Diagnostic>

source

fn default() -> Option<Self>

Implementations on Foreign Types§

source§

impl<T> FromMeta for Option<T>where T: FromMeta,

source§

impl FromMeta for String

source§

impl FromMeta for usize

source§

impl FromMeta for isize

source§

impl FromMeta for bool

Implementors§

source§

impl FromMeta for Expr

source§

impl FromMeta for TokenStream

source§

impl<T> FromMeta for SpanWrapped<T>where T: FromMeta,

source§

impl<T, P> FromMeta for Punctuated<T, P>where T: Parse, P: Parse,