MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / as_array

Method as_array

crates/gitql-core/src/values/base.rs:476–481  ·  view source on GitHub ↗

Return List of [`Value`] represent the inner values of [`ArrayValue`] or None if this type it's called from wrong [`Value`]

(&self)

Source from the content-addressed store, hash-verified

474 /// Return List of [`Value`] represent the inner values of [`ArrayValue`]
475 /// or None if this type it's called from wrong [`Value`]
476 pub fn as_array(&self) -> Option<Vec<Box<dyn Value>>> {
477 if let Some(array_value) = self.as_any().downcast_ref::<ArrayValue>() {
478 return Some(array_value.values.clone());
479 }
480 None
481 }
482
483 /// Return true if this value is [`RangeValue`]
484 pub fn is_range(&self) -> bool {

Callers 15

group_eq_opMethod · 0.80
group_bang_eq_opMethod · 0.80
group_gt_opMethod · 0.80
group_gte_opMethod · 0.80
group_lt_opMethod · 0.80
group_lte_opMethod · 0.80
group_eq_opMethod · 0.80
group_bang_eq_opMethod · 0.80
group_gt_opMethod · 0.80
group_gte_opMethod · 0.80
group_lt_opMethod · 0.80
group_lte_opMethod · 0.80

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected