pub trait ReplaceExprwhere
Self: Sized,{
// Required method
fn replace_expr(&self, expr: Expr) -> Option<Self>;
// Provided method
fn is_replaceable(&self) -> bool { ... }
}Expand description
Provides functionality to replacee inner Expr and return new Self with given Expr.
Required Methods§
Sourcefn replace_expr(&self, expr: Expr) -> Option<Self>
fn replace_expr(&self, expr: Expr) -> Option<Self>
Replaces current expr by given Expr if it’s possible, returning Some(new Self) with given Expr,
otherwise returns None.
Provided Methods§
Sourcefn is_replaceable(&self) -> bool
fn is_replaceable(&self) -> bool
Can expr be replaced or not.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".