pub trait ExprExt {
// Required methods
fn as_string(&self) -> Result<String>;
fn as_path(&self) -> Result<&Path>;
fn as_int<N>(&self) -> Result<N>
where N: FromStr,
N::Err: Display;
fn as_closure(&self) -> Result<&ExprClosure>;
fn as_call_or_closure(&self) -> Result<CallOrClosure>;
fn as_call(&self) -> Result<&ExprCall>;
fn as_path_or_closure(&self) -> Result<PathOrClosure>;
fn as_range(&self) -> Result<&ExprRange>;
}Required Methods§
fn as_string(&self) -> Result<String>
fn as_path(&self) -> Result<&Path>
fn as_int<N>(&self) -> Result<N>
fn as_closure(&self) -> Result<&ExprClosure>
fn as_call_or_closure(&self) -> Result<CallOrClosure>
fn as_call(&self) -> Result<&ExprCall>
fn as_path_or_closure(&self) -> Result<PathOrClosure>
fn as_range(&self) -> Result<&ExprRange>
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.