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§
Sourcefn to_pattern(&self) -> Pat
fn to_pattern(&self) -> Pat
Convert &Self -> syn::Pat.
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.