1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use crate::value::Value; impl From<&str> for Value { fn from(v: &str) -> Self { Value::String(v.to_string()) } } impl From<Option<&str>> for Value { fn from(v: Option<&str>) -> Self { match v { Some(s) => Self::from(s), None => Value::Null, } } }