adding Value to String

This commit is contained in:
Chris Cochrun 2024-11-28 06:50:03 -06:00
parent b4a393cce7
commit c3abe2fe48

View file

@ -109,6 +109,15 @@ impl From<Value> for String {
}
}
impl From<&Value> for String {
fn from(value: &Value) -> Self {
match value {
Value::String(str) => str.clone(),
_ => String::default(),
}
}
}
impl From<Value> for i32 {
fn from(value: Value) -> Self {
match value {