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

Method as_range

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

Return Tuple of two [`Value`] represent the start and the end of [`RangeValue`] or None if this type it's called from wrong [`Value`]

(&self)

Source from the content-addressed store, hash-verified

488 /// Return Tuple of two [`Value`] represent the start and the end of [`RangeValue`]
489 /// or None if this type it's called from wrong [`Value`]
490 pub fn as_range(&self) -> Option<(Box<dyn Value>, Box<dyn Value>)> {
491 if let Some(range_value) = self.as_any().downcast_ref::<RangeValue>() {
492 return Some((range_value.lower.clone(), range_value.upper.clone()));
493 }
494 None
495 }
496
497 /// Return true if this value is [`NullValue`]
498 pub fn is_null(&self) -> bool {

Callers 1

isemptyFunction · 0.80

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected