MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / rect_from_node

Function rect_from_node

packages/server/src/devtools.rs:1951–1956  ·  view source on GitHub ↗
(node: &Value)

Source from the content-addressed store, hash-verified

1949}
1950
1951fn rect_from_node(node: &Value) -> Option<Rect> {
1952 ["frameInScreen", "frame", "bounds"]
1953 .into_iter()
1954 .filter_map(|key| node.get(key).and_then(rect_from_value))
1955 .next()
1956}
1957
1958fn rect_from_value(value: &Value) -> Option<Rect> {
1959 let object = value.as_object()?;

Callers 1

insert_nodeMethod · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected