diff --git a/src/library.rs b/src/library.rs index a67460b16..bc9f9edfa 100644 --- a/src/library.rs +++ b/src/library.rs @@ -556,6 +556,8 @@ pub struct Function { pub get_property: Option, pub set_property: Option, pub finish_func: Option, + pub async_func: Option, + pub sync_func: Option, } #[derive(Debug)] diff --git a/src/parser.rs b/src/parser.rs index c8244081d..426ec3652 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -598,6 +598,8 @@ impl Library { get_property: None, set_property: None, finish_func: None, + async_func: None, + sync_func: None, }) } else { Err(parser.fail("Missing element")) @@ -1031,6 +1033,8 @@ impl Library { ) }) }); + let async_func = elem.attr("async-func").map(ToString::to_string); + let sync_func = elem.attr("sync-func").map(ToString::to_string); let mut params = Vec::new(); let mut ret = None; @@ -1123,6 +1127,8 @@ impl Library { get_property, set_property, finish_func, + async_func, + sync_func, }) } else { Err(parser.fail_with_position(