Value

Trait Value 

Source
pub trait Value: Parse + Clone {
    type Context: ContextLike;

    // Required method
    fn build(item: &Self, ctx: Ref<Self::Context>) -> Result<TokenStream>;

    // Provided method
    fn parse2(stream: TokenStream) -> Result<Self> { ... }
}

Required Associated Types§

Required Methods§

Source

fn build(item: &Self, ctx: Ref<Self::Context>) -> Result<TokenStream>

Provided Methods§

Source

fn parse2(stream: TokenStream) -> Result<Self>

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 Value for Expr

Source§

type Context = Context

Source§

fn build(item: &Self, _: Ref<Self::Context>) -> Result<TokenStream>

Implementors§