(value: proto::FieldValue)
| 16 | impl TryFrom<proto::FieldValue> for FieldValue { |
| 17 | type Error = String; |
| 18 | fn try_from(value: proto::FieldValue) -> Result<Self, Self::Error> { |
| 19 | match value.value { |
| 20 | Some(proto::field_value::Value::IntValue(i)) => Ok(FieldValue::Int(i)), |
| 21 | Some(proto::field_value::Value::StringValue(s)) => Ok(FieldValue::String(s)), |
| 22 | None => Err("FieldValue must have a value".to_string()), |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | // MetadataField conversions |
nothing calls this directly
no outgoing calls
no test coverage detected