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

Function to_value

cel/src/ser.rs:203–208  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

201pub type Result<T> = std::result::Result<T, SerializationError>;
202
203pub fn to_value<T>(value: T) -> Result<Value>
204where
205 T: Serialize,
206{
207 value.serialize(Serializer)
208}
209
210impl ser::Serializer for Serializer {
211 type Ok = Value;

Callers 11

serialize_elementMethod · 0.85
serialize_fieldMethod · 0.85
test_unitFunction · 0.85
test_newtypeFunction · 0.85
test_optionsFunction · 0.85
test_tuplesFunction · 0.85
test_mapsFunction · 0.85
test_time_typesFunction · 0.85
try_into_valueMethod · 0.85
jsonMethod · 0.85

Calls 1

serializeMethod · 0.45

Tested by 7

test_unitFunction · 0.68
test_newtypeFunction · 0.68
test_optionsFunction · 0.68
test_tuplesFunction · 0.68
test_mapsFunction · 0.68
test_time_typesFunction · 0.68