pub trait RpcServer: MassaRpcServer {
// 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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.