api macro: support reload_timezone

This commit is contained in:
Dietmar Maurer 2020-04-15 17:26:43 +02:00
parent 9c523a4de6
commit 25dbb0ebab

View File

@ -51,6 +51,12 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
None => TokenStream::new(), None => TokenStream::new(),
}; };
let reload_timezone: bool = attribs
.remove("reload_timezone")
.map(TryFrom::try_from)
.transpose()?
.unwrap_or(false);
let protected: bool = attribs let protected: bool = attribs
.remove("protected") .remove("protected")
.map(TryFrom::try_from) .map(TryFrom::try_from)
@ -142,6 +148,7 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
) )
#returns_schema_setter #returns_schema_setter
#access_setter #access_setter
.reload_timezone(#reload_timezone)
.protected(#protected); .protected(#protected);
#default_consts #default_consts