Expr

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 methods
    fn to_expr_proto(&self) -> ExprNode { ... }
    fn to_expr_proto_checked_pure(
        &self,
        retract: bool,
        context: &str,
    ) -> Result<ExprNode>
       where Self: Clone { ... }
}
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.

Source

fn to_expr_proto_checked_pure( &self, retract: bool, context: &str, ) -> Result<ExprNode>
where Self: Clone,

Serialize the expression. Returns an error if this will result in an impure expression on a retract stream, which may lead to inconsistent results.

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§