pub trait InterfaceApi: 'static + Send + Sync + Clone {
    type ApiRequest: TryFrom<SerializedBytes, Error = SerializedBytesError> + Send + Sync;
    type ApiResponse: TryInto<SerializedBytes, Error = SerializedBytesError> + Send + Sync;

    fn handle_request<'life0, 'async_trait>(
        &'life0 self,
        request: Result<Self::ApiRequest, SerializedBytesError>
    ) -> Pin<Box<dyn Future<Output = InterfaceResult<Self::ApiResponse>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Expand description

A trait that unifies both the admin and app interfaces

Required Associated Types§

Which request is being made

Which response is sent to the above request

Required Methods§

Handle a request on this API

Implementors§