Skip to main content

Raise

Trait Raise 

Source
pub trait Raise {
    type Value: Copy;

    // Required method
    fn emit(
        &mut self,
        cx: &Context,
        e: Expr,
        node: &View,
        operands: &[Self::Value],
    ) -> Result<Self::Value, Error>;
}
Expand description

Turns expression nodes back into the host’s instructions (see Lowering::raise).

Required Associated Types§

Source

type Value: Copy

The host’s handle of a value.

Required Methods§

Source

fn emit( &mut self, cx: &Context, e: Expr, node: &View, operands: &[Self::Value], ) -> Result<Self::Value, Error>

Emits instructions computing node e (node is its View) from the host values of its operands, in the order the view lists them (none for a constant or a symbol); returns the value that holds it. Called only for nodes no host value computes yet, operands first.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§