Trait Expr

Source
pub trait Expr: Into<ExprImpl> {
    // Required methods
    fn return_type(&self) -> DataType;
    fn try_to_expr_proto(&self) -> Result<ExprNode, String>;

    // Provided method
    fn to_expr_proto(&self) -> ExprNode { ... }
}
Expand description

the trait of bound expressions

Required Methods§

Source

fn return_type(&self) -> DataType

Get the return type of the expr

Source

fn try_to_expr_proto(&self) -> Result<ExprNode, String>

Try to serialize the expression, returning an error if it’s impossible.

Provided Methods§

Source

fn to_expr_proto(&self) -> ExprNode

Serialize the expression. Panic if it’s impossible.

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.

Implementors§