pub async fn init(cfg: Configuration) -> Result<State> {
    let client = APIClient::new(cfg);
    let state = State::new(client).await?;
    state.poller().await?; // starts inifinite polling tasks
    Ok(state)
}
/// Initiailize state machine for an actix app
///
/// Returns a Sync
Initiailize state machine for an actix app
Returns a Sync
Initiailize state machine for an actix app Returns a Sync
pub async fn init(cfg: Configuration) -> Result<State> {
    let client = APIClient::new(cfg);
    let state = State::new(client).await?;
    state.poller().await?; // starts inifinite polling tasks
    Ok(state)
}
pub async fn init ( cfg : Configuration ) -> Result < State > { let client = APIClient :: new ( cfg ) ; let state = State :: new ( client ) . await ? ; state . poller ( ) . await ? ; // starts inifinite polling tasks Ok ( state ) }
Initiailize state machine for an actix app
Returns a Sync
Initiailize state machine for an actix app Returns a Sync
cfg
Configuration
cfg
Configuration