Trait inator::Expression

source ·
pub trait Expression: Debug {
    // Required methods
    fn to_expr(&self) -> Expr;
    fn to_pattern(&self) -> Pat;
    fn to_type() -> Type;
}
Expand description

Convert to a variety of source-code-related formats.

Required Methods§

source

fn to_expr(&self) -> Expr

Convert &Self -> syn::Expr.

source

fn to_pattern(&self) -> Pat

Convert &Self -> syn::Pat.

source

fn to_type() -> Type

Write a syn::Type type representing this value’s type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Expression for char

source§

impl Expression for u8

Implementors§