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

Method as_bool

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

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

(&self)

Source from the content-addressed store, hash-verified

396 /// Return List of [`bool`] represent the inner value of [`BoolValue`]
397 /// or None if this type it's called from wrong [`Value`]
398 pub fn as_bool(&self) -> Option<bool> {
399 if let Some(bool_value) = self.as_any().downcast_ref::<BoolValue>() {
400 return Some(bool_value.value);
401 }
402 None
403 }
404
405 /// Return true if this value is [`DateValue`]
406 pub fn is_date(&self) -> bool {

Callers 7

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
general_ifFunction · 0.80

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected