pub trait MethodCallback {
// Required method
fn call(
&mut self,
context: &mut MethodCallbackContext,
) -> MethodCallbackResult;
}Expand description
Method callback.
The call callback implement the operation on the method when it is added via
Server::add_method_node().
Required Methods§
Sourcefn call(&mut self, context: &mut MethodCallbackContext) -> MethodCallbackResult
fn call(&mut self, context: &mut MethodCallbackContext) -> MethodCallbackResult
Calls method.
This is called when a client wants to call the method. The input arguments are available,
and the output arguments are expected to be returned, through the context argument. See
MethodCallbackContext::input_arguments() and
MethodCallbackContext::output_arguments_mut() for details.
§Errors
This should return an appropriate error when the call is not possible. The underlying status code is forwarded to the client.