diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-17 16:24:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-17 16:24:29 +0100 |
| commit | 35b16e545b4fce299edbc00c9a9754179fa51634 (patch) | |
| tree | eb1081e55187e59ff6482abc1ac2f1932606ef59 /library/src/compute/data.rs | |
| parent | b6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (diff) | |
Document parameters in comment
Diffstat (limited to 'library/src/compute/data.rs')
| -rw-r--r-- | library/src/compute/data.rs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/library/src/compute/data.rs b/library/src/compute/data.rs index af545304..5de3eb61 100644 --- a/library/src/compute/data.rs +++ b/library/src/compute/data.rs @@ -6,7 +6,12 @@ use crate::prelude::*; /// Read structured data from a CSV file. /// -/// Tags: data-loading. +/// # Parameters +/// - path: EcoString (positional, required) +/// Path to a CSV file. +/// +/// # Tags +/// - data-loading #[func] pub fn csv(vm: &Vm, args: &mut Args) -> SourceResult<Value> { let Spanned { v: path, span } = @@ -49,7 +54,12 @@ fn format_csv_error(error: csv::Error) -> String { /// Read structured data from a JSON file. /// -/// Tags: data-loading. +/// # Parameters +/// - path: EcoString (positional, required) +/// Path to a JSON file. +/// +/// # Tags +/// - data-loading #[func] pub fn json(vm: &Vm, args: &mut Args) -> SourceResult<Value> { let Spanned { v: path, span } = @@ -92,7 +102,12 @@ fn format_json_error(error: serde_json::Error) -> String { /// Read structured data from an XML file. /// -/// Tags: data-loading. +/// # Parameters +/// - path: EcoString (positional, required) +/// Path to an XML file. +/// +/// # Tags +/// - data-loading #[func] pub fn xml(vm: &Vm, args: &mut Args) -> SourceResult<Value> { let Spanned { v: path, span } = |
