pub trait AppInterfaceApi: 'static + Send + Sync + Clone {
    fn handle_app_request_inner<'life0, 'async_trait>(
        &'life0 self,
        request: AppRequest
    ) -> Pin<Box<dyn Future<Output = ConductorApiResult<AppResponse>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn handle_app_request<'life0, 'async_trait>(
        &'life0 self,
        request: AppRequest
    ) -> Pin<Box<dyn Future<Output = AppResponse> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
, { ... } }
Expand description

The interface that a Conductor exposes to the outside world.

Required Methods§

Call an admin function to modify this Conductor’s behavior

Provided Methods§

Deal with error cases produced by handle_app_request_inner

Examples found in repository?
src/conductor/api/api_external/app_interface.rs (line 135)
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    async fn handle_request(
        &self,
        request: Result<Self::ApiRequest, SerializedBytesError>,
    ) -> InterfaceResult<Self::ApiResponse> {
        {
            self.conductor_handle
                .check_running()
                .map_err(Box::new)
                .map_err(InterfaceError::RequestHandler)?;
        }
        match request {
            Ok(request) => Ok(AppInterfaceApi::handle_app_request(self, request).await),
            Err(e) => Ok(AppResponse::Error(SerializationError::from(e).into())),
        }
    }

Implementors§