diff options
author | Robert Helgesson <robert@rycee.net> | 2020-07-24 16:31:56 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-07-24 16:45:13 +0200 |
commit | 83301ca7871b67beb3940134efc00ecc31061981 (patch) | |
tree | 814728b408ac61855255f789dfe9b56bd911771b /doc/writing-modules.adoc | |
parent | 8ad55800216760291e253150a7ecc831c2956229 (diff) |
lib: support gvariant maybe type
Fixes #1397
Diffstat (limited to '')
-rw-r--r-- | doc/writing-modules.adoc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/writing-modules.adoc b/doc/writing-modules.adoc index 41678c30d70..0f3336ff2c0 100644 --- a/doc/writing-modules.adoc +++ b/doc/writing-modules.adoc @@ -168,13 +168,20 @@ Builds a GVariant array containing the given list of elements, where each elemen - `hm.gvariant.type.uint64` - `hm.gvariant.type.double` - `hm.gvariant.type.arrayOf type` +- `hm.gvariant.type.maybeOf type` - `hm.gvariant.type.tupleOf types` -- + -where `type` and `types` are themselve a type and list of types, respectively. +where `type` and `types` are themselves a type and list of types, respectively. + `hm.gvariant.mkEmptyArray type`::: An alias of `hm.gvariant.mkArray type []`. + +`hm.gvariant.mkNothing type`::: +Builds a GVariant maybe value whose (non-existent) element is of the given type. The `type` value is constructed as described for the `mkArray` function above. ++ +`hm.gvariant.mkJust element`::: +Builds a GVariant maybe value containing the given GVariant element. ++ `hm.gvariant.mkTuple elements`::: Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value. |