Skip to main content

TableBackend

Trait TableBackend 

Source
pub trait TableBackend: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn new_table(
        &self,
        cx: &mut Cx,
        entries: Vec<(Symbol, Value)>,
    ) -> Result<Value>;
}
Expand description

Factory protocol for constructing tables in a particular representation.

Required Methods§

Source

fn name(&self) -> &str

Stable name the backend is registered and selected under.

Source

fn new_table(&self, cx: &mut Cx, entries: Vec<(Symbol, Value)>) -> Result<Value>

Builds a table from an initial set of entries.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§