Skip to main content

all_rest_routes

Function all_rest_routes 

Source
pub fn all_rest_routes<S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(
    availability_service: Arc<S0>,
    node_service: Arc<S1>,
    merklized_state_service: Arc<S2>,
    reward_state_service: Arc<S3>,
    catchup_service: Arc<S4>,
    config_service: Arc<S5>,
    database_service: Arc<S6>,
    explorer_service: Arc<S7>,
    light_client_service: Arc<S8>,
    state_signature_service: Arc<S9>,
    status_service: Arc<S10>,
    submit_service: Arc<S11>,
    token_service: Arc<S12>,
) -> Router
where S0: AvailabilityService + Send + Sync + 'static, S1: NodeService + Send + Sync + 'static, S2: MerklizedStateService + Send + Sync + 'static, S3: RewardStateService + Send + Sync + 'static, S4: CatchupService + Send + Sync + 'static, S5: ConfigService + Send + Sync + 'static, S6: DatabaseService + Send + Sync + 'static, S7: ExplorerService + Send + Sync + 'static, S8: LightClientService + Send + Sync + 'static, S9: StateSignatureService + Send + Sync + 'static, S10: StatusService + Send + Sync + 'static, S11: SubmitService + Send + Sync + 'static, S12: TokenService + Send + Sync + 'static,
Expand description

Build a combined Axum router with REST routes for all proto services.

Each service is generic - pass your concrete implementations as Arc<T>.