MCPcopy Create free account
hub / github.com/dprint/jsonc-parser / as_array

Method as_array

src/cst/mod.rs:458–463  ·  view source on GitHub ↗

Node if it's an array.

(&self)

Source from the content-addressed store, hash-verified

456
457 /// Node if it's an array.
458 pub fn as_array(&self) -> Option<CstArray> {
459 match self {
460 CstNode::Container(CstContainerNode::Array(node)) => Some(node.clone()),
461 _ => None,
462 }
463 }
464
465 /// Node if it's an object property.
466 pub fn as_object_prop(&self) -> Option<CstObjectProp> {

Callers 5

element_indexMethod · 0.45
array_valueMethod · 0.45
uses_trailing_commasFunction · 0.45
run_testFunction · 0.45
array_ensure_multilineFunction · 0.45

Calls

no outgoing calls

Tested by 1

array_ensure_multilineFunction · 0.36