adding Value to String
This commit is contained in:
parent
b4a393cce7
commit
c3abe2fe48
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue