pub trait AsValue { type Output: Borrow<Value>; // Required method fn as_value(self) -> Self::Output; }
A trait for types that can be converted into a Value or allow accessing it as a reference.
Value
The type of the value. It needs to be able to be borrowed as a Value.
Converts the value into a type that can be borrowed as a Value.