Skip to main content

JscBridge

Trait JscBridge 

Source
pub trait JscBridge: Send + Sync {
    // Required methods
    fn render_page(&self, props_json: String) -> Result<String, String>;
    fn render_component(
        &self,
        component_id: String,
        props_json: String,
    ) -> Result<String, String>;
}
Expand description

Trait abstracting the JSC render pool so bext-php doesn’t depend on bext-core.

Required Methods§

Source

fn render_page(&self, props_json: String) -> Result<String, String>

Render a full page given props JSON. Returns HTML on success, error string on failure.

Source

fn render_component( &self, component_id: String, props_json: String, ) -> Result<String, String>

Render a single component.

Implementors§