pub trait Handler: Send + Sync {
// Required method
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 [Value],
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
trait describing server methods that can be called via XML-RPC
Handlers for XML-RPC method calls must implement this trait. It is already implemented for fn
functions with the same arguments as the handler
method in this trait.
For method handlers that need to keep track of some state (or handle authentication, etc.), just implement this trait for your own struct.
Required Methods§
Sourcefn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 [Value],
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 [Value],
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This method is called for handling incoming XML-RPC method requests with the method name
registered for this Handler
, with the request’s method parameters as its arguments.