Improve arg parsing

This commit is contained in:
2026-03-11 12:54:02 -07:00
parent 2af318c0ec
commit eea01616a3
19 changed files with 327 additions and 98 deletions

View File

@@ -10,6 +10,7 @@ pub trait ObjectExtractor: Send + Sync {
async fn field(
&self,
name: &pile_config::Label,
args: Option<&str>,
) -> Result<Option<crate::value::PileValue>, std::io::Error>;
/// Return all fields in this extractor.
@@ -22,7 +23,7 @@ pub trait ObjectExtractor: Send + Sync {
let keys = self.fields().await?;
let mut map = serde_json::Map::new();
for k in &keys {
let v = match self.field(k).await? {
let v = match self.field(k, None).await? {
Some(x) => x,
None => continue,
};