Trait FromIteratorJs

Source
pub trait FromIteratorJs<'js, A>: Sized {
    type Item;

    // Required method
    fn from_iter_js<T>(ctx: &Ctx<'js>, iter: T) -> Result<Self>
       where T: IntoIterator<Item = A>;
}
Expand description

The Rust’s FromIterator trait to use with Ctx

Required Associated Types§

Required Methods§

Source

fn from_iter_js<T>(ctx: &Ctx<'js>, iter: T) -> Result<Self>
where T: IntoIterator<Item = A>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'js, A> FromIteratorJs<'js, A> for Array<'js>
where A: IntoJs<'js>,

Source§

type Item = Value<'js>

Source§

impl<'js, K, V> FromIteratorJs<'js, (K, V)> for Object<'js>
where K: IntoAtom<'js>, V: IntoJs<'js>,

Source§

type Item = (Atom<'js>, Value<'js>)