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

Method is_array_of

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

Return true if this value is [`ArrayValue`] and element type match condition

(&self, condition: fn(&Box<dyn DataType>) -> bool)

Source from the content-addressed store, hash-verified

465
466 /// Return true if this value is [`ArrayValue`] and element type match condition
467 pub fn is_array_of(&self, condition: fn(&Box<dyn DataType>) -> bool) -> bool {
468 if let Some(array) = self.as_any().downcast_ref::<ArrayValue>() {
469 return condition(&array.base_type);
470 }
471 false
472 }
473
474 /// Return List of [`Value`] represent the inner values of [`ArrayValue`]
475 /// or None if this type it's called from wrong [`Value`]

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