use super::Value;
use crate::{LazyValue, Number};
impl TryFrom<f32> for Value {
type Error = crate::Error;
#[inline]
fn try_from(value: f32) -> Result<Self, Self::Error> {
Number::try_from(value).map(Into::into)
}
}
impl TryFrom<f64> for Value {
type Error = crate::Error;
#[inline]
fn try_from(value: f64) -> Result<Self, Self::Error> {
Number::try_from(value).map(Into::into)
}
}
impl<'de> TryFrom<LazyValue<'de>> for Value {
type Error = crate::Error;
fn try_from(value: LazyValue<'de>) -> Result<Self, Self::Error> {
crate::from_str(value.as_raw_str())
}
}