CallableMethod

Trait CallableMethod 

Source
pub trait CallableMethod: Method {
    // Required method
    fn call(&mut self, context: MethodCall) -> MethodResult;
}
Expand description

Methods are defined by this trait. A method struct has to first implement the informational Method trait and then it can implement this struct for executing stuff actually.

This trait cannot be derived by any macro.

Required Methods§

Source

fn call(&mut self, context: MethodCall) -> MethodResult

This method gets called when the method is called. It gets a context which contains (again) all the arguments and the name of the method.

§Return

The response has to have a response code and (optionally) a response value which is represented as a serde_json::Value. This value has to contain

Implementors§

Source§

impl<T, A> CallableMethod for T
where A: DeserializeOwned, T: MethodCallable<ArgumentsType = A>,