MCPcopy Create free account
hub / github.com/dfinity/ic-repl / get_field

Function get_field

src/utils.rs:212–216  ·  view source on GitHub ↗
(fs: &'a [IDLField], key: &'a str)

Source from the content-addressed store, hash-verified

210}
211
212pub fn get_field<'a>(fs: &'a [IDLField], key: &'a str) -> Option<&'a IDLValue> {
213 fs.iter()
214 .find(|f| f.id == Label::Named(key.to_string()))
215 .map(|f| &f.val)
216}
217
218pub fn args_to_value(mut args: IDLArgs) -> IDLValue {
219 match args.args.len() {

Callers 1

evalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected