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

Method as_int

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

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

(&self)

Source from the content-addressed store, hash-verified

363 /// Return List of [`i64`] represent the inner value of [`IntValue`]
364 /// or None if this type it's called from wrong [`Value`]
365 pub fn as_int(&self) -> Option<i64> {
366 if let Some(int_value) = self.as_any().downcast_ref::<IntValue>() {
367 return Some(int_value.value);
368 }
369 None
370 }
371
372 /// Return true if this value is [`FloatValue`]
373 pub fn is_float(&self) -> bool {

Callers 15

execute_offset_statementFunction · 0.80
add_opMethod · 0.80
sub_opMethod · 0.80
mul_opMethod · 0.80
div_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
window_nth_valueFunction · 0.80

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected