Skip to main content

View

Trait View 

Source
pub trait View: Send + Sync {
    // Required method
    fn encode(&self, cx: &mut Cx, value: &Expr) -> Result<Expr>;
}
Expand description

A view encoder: Value -> Scene. Views are pure: the same value and options yield the same Scene.

Required Methods§

Source

fn encode(&self, cx: &mut Cx, value: &Expr) -> Result<Expr>

Encode the value (in Expr form) into a Scene value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§