summaryrefslogtreecommitdiff
path: root/src/model/func.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-17 16:24:29 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-17 16:24:29 +0100
commit35b16e545b4fce299edbc00c9a9754179fa51634 (patch)
treeeb1081e55187e59ff6482abc1ac2f1932606ef59 /src/model/func.rs
parentb6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (diff)
Document parameters in comment
Diffstat (limited to 'src/model/func.rs')
-rw-r--r--src/model/func.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/model/func.rs b/src/model/func.rs
index 5b38b700..46befd77 100644
--- a/src/model/func.rs
+++ b/src/model/func.rs
@@ -232,12 +232,21 @@ pub struct ParamInfo {
pub name: &'static str,
/// Documentation for the parameter.
pub docs: &'static str,
- /// Is the parameter settable with a set rule?
- pub settable: bool,
- /// Can the name be omitted?
- pub shorthand: bool,
/// Valid values for the parameter.
pub cast: CastInfo,
+ /// Is the parameter positional?
+ pub positional: bool,
+ /// Is the parameter named?
+ ///
+ /// Can be true even if `positional` is true if the parameter can be given
+ /// in both variants.
+ pub named: bool,
+ /// Is the parameter required?
+ pub required: bool,
+ /// Can the parameter be given any number of times?
+ pub variadic: bool,
+ /// Is the parameter settable with a set rule?
+ pub settable: bool,
}
/// A user-defined closure.