From 6278365fd99acfcdec27f149122038bf7ae64325 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 1 Feb 2019 10:38:07 +0100 Subject: [PATCH] improve ApiMethod docu --- src/api/router.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/router.rs b/src/api/router.rs index b159ca4a..01a71dba 100644 --- a/src/api/router.rs +++ b/src/api/router.rs @@ -63,6 +63,7 @@ type ApiHandlerFn = fn(Value, &ApiMethod, &mut dyn RpcEnvironment) -> Result Result; +/// This struct defines synchronous API call which returns the restulkt as json `Value` pub struct ApiMethod { /// The protected flag indicates that the provides function should be forwarded /// to the deaemon running in priviledged mode. @@ -70,8 +71,11 @@ pub struct ApiMethod { /// This flag indicates that the provided method may change the local timezone, so the server /// should do a tzset afterwards pub reload_timezone: bool, + /// Parameter type Schema pub parameters: ObjectSchema, + /// Return type Schema pub returns: Arc, + /// Handler function pub handler: ApiHandlerFn, }