[][src]Trait macro_input_core::FromLit

pub trait FromLit: Sized {
    pub fn from(lit: Option<Lit>) -> Result<Self>;
}

a trait for extracting a value from a literal

FromMeta is automatically implemented for all implementations

Required methods

pub fn from(lit: Option<Lit>) -> Result<Self>[src]

extract the value

Errors

may return an Error if the literal doesn't contain the correct value

Loading content...

Implementations on Foreign Types

impl FromLit for Option<Lit>[src]

impl FromLit for String[src]

impl FromLit for Vec<u8>[src]

impl FromLit for u8[src]

impl FromLit for char[src]

impl FromLit for i32[src]

impl FromLit for f32[src]

impl FromLit for bool[src]

impl<V: FromLit> FromLit for Option<V>[src]

Loading content...

Implementors

Loading content...