Crate ej_builder_sdk

Source
Expand description

Builder SDK for the EJ framework.

Provides communication interface between builders and the EJ dispatcher.

§Usage

use ej_builder_sdk::{BuilderSdk, BuilderEvent};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let sdk = BuilderSdk::init(|event| {
        match event {
            BuilderEvent::Exit => {
                // Cleanup logic here
                println!("Received exit signal");
                std::process::exit(0);
            }
        }
    }).await.unwrap();
     
    // Builder logic here
    Ok(())
}

Re-exports§

pub use crate::error::Error;

Modules§

error
Error types for the builder SDK.

Structs§

BuilderSdk
Builder SDK for communicating with the EJ dispatcher.

Enums§

BuilderEvent
Events sent from the dispatcher to the builder.
BuilderResponse
Responses sent from the builder to the dispatcher.

Type Aliases§

Result
Result type for builder SDK operations.