Skip to main content

RuntimeIndexSource

Trait RuntimeIndexSource 

Source
pub trait RuntimeIndexSource: Send + Sync {
    // Required method
    fn value_at_runtime_index(
        &self,
        cx: &mut Cx,
        index: i64,
    ) -> Result<Option<Value>>;
}
Expand description

Source of values addressed by contiguous integer keys.

This keeps array projection independent from any one table implementation: mutation tables, language objects, or host-backed stores can all provide the same integer-key lookup surface without adding a dependency edge.

Required Methods§

Source

fn value_at_runtime_index( &self, cx: &mut Cx, index: i64, ) -> Result<Option<Value>>

Returns the value at index, or None to end the contiguous projection.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§