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

Method as_keyref

cel/src/objects.rs:131–138  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

129
130impl AsKeyRef for Key {
131 fn as_keyref(&self) -> KeyRef<'_> {
132 match self {
133 Key::Int(i) => KeyRef::Int(*i),
134 Key::Uint(u) => KeyRef::Uint(*u),
135 Key::Bool(b) => KeyRef::Bool(*b),
136 Key::String(s) => KeyRef::String(s.as_str()),
137 }
138 }
139}
140
141impl<'a> AsKeyRef for KeyRef<'a> {

Callers 4

getMethod · 0.45
eqMethod · 0.45
hashMethod · 0.45
cmpMethod · 0.45

Calls 3

IntClass · 0.85
BoolClass · 0.85
StringClass · 0.85

Tested by

no test coverage detected