Skip to main content

LocalAdapter

Trait LocalAdapter 

Source
pub trait LocalAdapter {
    type State;

    // Required method
    fn adapt(
        &self,
        scene: &EncodedScene,
        state: &Self::State,
        profile: &DeviceProfile,
    ) -> Result<Rc<Expr>>;
}
Expand description

The latency-critical, device-local last step of surface projection.

A local adapter is pure: it receives an already encoded Scene, the freshest device-local state, and the typed device profile. It does not receive a runtime context, cannot call SIM code, and cannot re-enter the content encoder.

Required Associated Types§

Source

type State

Device-local state consumed by the adapter.

Required Methods§

Source

fn adapt( &self, scene: &EncodedScene, state: &Self::State, profile: &DeviceProfile, ) -> Result<Rc<Expr>>

Adapts an already encoded Scene for one device state sample.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§