[oden-js] TryFromValue for Value

This commit is contained in:
John Doty 2023-06-20 06:17:34 -07:00
parent a48a9efdb4
commit 83a0950153

View file

@ -1,4 +1,4 @@
use crate::{ContextRef, Error, Result, ValueRef}; use crate::{ContextRef, Error, Result, Value, ValueRef};
use std::num::TryFromIntError; use std::num::TryFromIntError;
pub trait TryFromValue: Sized { pub trait TryFromValue: Sized {
@ -98,10 +98,9 @@ impl TryFromValue for String {
} }
} }
// impl<'c, T: Class> TryFrom<&'c ValueRef<'_>> for T { impl TryFromValue for Value {
// #[inline]
// #[inline] fn try_from_value(value: &ValueRef, ctx: &ContextRef) -> Result<Self> {
// fn try_from_value(value: &ValueRef, ctx:&ContextRef) -> Result< Self> { Ok(value.dup(ctx))
// T::from_value(value) }
// } }
// }