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