MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / try_into

Method try_into

cel/src/objects.rs:260–268  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

258
259 #[inline(always)]
260 fn try_into(self) -> Result<Key, Self::Error> {
261 match self {
262 Value::Int(v) => Ok(Key::Int(v)),
263 Value::UInt(v) => Ok(Key::Uint(v)),
264 Value::String(v) => Ok(Key::String(v)),
265 Value::Bool(v) => Ok(Key::Bool(v)),
266 _ => Err(self),
267 }
268 }
269}
270
271/// Implement conversions from [`KeyRef`] into [`Value`]

Callers 15

resolveMethod · 0.80
from_strFunction · 0.80
from_contextMethod · 0.80
serialize_fieldMethod · 0.80
uintFunction · 0.80
intFunction · 0.80
optional_or_optionalFunction · 0.80
optional_or_valueFunction · 0.80
add_variableMethod · 0.80
get_variableMethod · 0.80
eqMethod · 0.80

Calls 3

IntClass · 0.85
StringClass · 0.85
BoolClass · 0.85

Tested by 3

from_strFunction · 0.64
try_into_vecFunction · 0.64
try_into_sliceFunction · 0.64