pub trait ApiServer: MassaApiServer {
// Required method
fn serve<'life0, 'life1, 'async_trait>(
self,
url: &'life0 SocketAddr,
api_config: &'life1 APIConfig,
) -> Pin<Box<dyn Future<Output = Result<StopHandle, JsonRpseeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Used to manage the API
Required Methods§
sourcefn serve<'life0, 'life1, 'async_trait>(
self,
url: &'life0 SocketAddr,
api_config: &'life1 APIConfig,
) -> Pin<Box<dyn Future<Output = Result<StopHandle, JsonRpseeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn serve<'life0, 'life1, 'async_trait>(
self,
url: &'life0 SocketAddr,
api_config: &'life1 APIConfig,
) -> Pin<Box<dyn Future<Output = Result<StopHandle, JsonRpseeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start the API
Object Safety§
This trait is not object safe.