Trait FromMeta

Source
pub trait FromMeta: Sized {
    // Required method
    fn from(meta: Option<Meta>) -> Result<Self>;
}
Expand description

a trait for extracting a value from Option<syn::Meta>

Required Methods§

Source

fn from(meta: Option<Meta>) -> Result<Self>

extract the value

§Errors

may return an Error if the meta doesn’t contain the correct value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromMeta for Option<()>

Source§

fn from(meta: Option<Meta>) -> Result<Self>

Source§

impl FromMeta for Option<Vec<Ident>>

Source§

fn from(meta: Option<Meta>) -> Result<Self>

Source§

impl FromMeta for Vec<Ident>

Source§

fn from(meta: Option<Meta>) -> Result<Self>

Implementors§

Source§

impl<F: FromLit> FromMeta for F