nanvm_lib/vm/object/
to_object.rs1use super::Object;
2use crate::vm::{IVm, Property, internal::IContainer};
3
4pub trait ToObject {
5 fn to_object<A: IVm>(self) -> Object<A>
6 where
7 Self: Sized + IntoIterator<Item = Property<A>>,
8 {
9 Object(A::InternalObject::new_ok((), self))
10 }
11}
12
13impl<T> ToObject for T {}