MCPcopy Create free account
hub / github.com/awslabs/llrt / get_all

Method get_all

modules/llrt_fetch/src/form_data.rs:107–119  ·  view source on GitHub ↗
(&self, ctx: Ctx<'js>, name: String)

Source from the content-addressed store, hash-verified

105 .map(|(_, v)| v.clone());
106 match value {
107 Some(v) => v.into_js(&ctx),
108 None => Ok(Value::new_null(ctx)),
109 }
110 }
111
112 pub fn get_all(&self, ctx: Ctx<'js>, name: String) -> Result<Vec<Value<'js>>> {
113 let values: Vec<FormValue<'js>> = self
114 .entries
115 .borrow()
116 .iter()
117 .filter(|(k, _)| *k == name)
118 .map(|(_, v)| v.clone())
119 .collect();
120 Ok(values
121 .into_iter()
122 .filter_map(|v| v.into_js(&ctx).ok())

Callers

nothing calls this directly

Calls 4

okMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45
into_jsMethod · 0.45

Tested by

no test coverage detected