MCPcopy Create free account
hub / github.com/PerroEngine/Perro / parse_params

Function parse_params

perro_source/core/perro_animation/src/panim/events.rs:78–88  ·  view source on GitHub ↗
(value: &SceneValue, line_no: usize)

Source from the content-addressed store, hash-verified

76}
77
78fn parse_params(value: &SceneValue, line_no: usize) -> Result<Vec<AnimationParam>, String> {
79 let SceneValue::Array(items) = value else {
80 return Err(format!("line {}: params must be an array", line_no));
81 };
82
83 let mut out = Vec::with_capacity(items.len());
84 for item in items.iter() {
85 out.push(parse_param(item, line_no)?);
86 }
87 Ok(out)
88}
89
90fn parse_param(value: &SceneValue, line_no: usize) -> Result<AnimationParam, String> {
91 match value {

Callers 2

parse_emit_signalFunction · 0.85
parse_call_methodFunction · 0.85

Calls 4

parse_paramFunction · 0.85
lenMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected