pub trait IntoJs<'js> {
    // Required method
    fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>;
}
Expand description

For converting rust values to javascript values

Required Methods§

source

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

Implementations on Foreign Types§

source§

impl<'js> IntoJs<'js> for &usize

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, L, R> IntoJs<'js> for &Either<L, R>where for<'a> &'a L: IntoJs<'js>, for<'a> &'a R: IntoJs<'js>,

Available on crate feature either only.

Convert the either into JS

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K, L, M> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K, L, M)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>, L: IntoJs<'js>, M: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>, L: IntoJs<'js>, M: IntoJs<'js>, N: IntoJs<'js>, O: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &[T]where for<'a> &'a T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, E> IntoJs<'js> for StdResult<T, E>where T: IntoJs<'js>, Error: From<E>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &BTreeSet<T>where for<'a> &'a T: IntoJs<'js>,

Convert from Rust btree set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C> IntoJs<'js> for (A, B, C)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E> IntoJs<'js> for (A, B, C, D, E)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &u32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, Tz: TimeZone> IntoJs<'js> for DateTime<Tz>

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G> IntoJs<'js> for (A, B, C, D, E, F, G)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K, L, M, N> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>, L: IntoJs<'js>, M: IntoJs<'js>, N: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &VecDeque<T>where for<'a> &'a T: IntoJs<'js>,

Convert from Rust vector deque to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &f64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &u16

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B> IntoJs<'js> for (A, B)where A: IntoJs<'js>, B: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D> IntoJs<'js> for (A, B, C, D)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &isize

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V> IntoJs<'js> for &BTreeMap<K, V>where for<'a> &'a K: IntoAtom<'js>, for<'a> &'a V: IntoJs<'js>,

Convert from Rust btree map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for u8

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for VecDeque<T>where T: IntoJs<'js>,

Convert from Rust vector deque to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for Cell<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, S> IntoJs<'js> for IndexSet<T, S>where T: IntoJs<'js>,

Available on crate feature indexmap only.

Convert from Rust index set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, S> IntoJs<'js> for HashSet<T, S>where T: IntoJs<'js>,

Convert from Rust hash set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for f32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F> IntoJs<'js> for (A, B, C, D, E, F)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for u32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H> IntoJs<'js> for (A, B, C, D, E, F, G, H)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V, S> IntoJs<'js> for HashMap<K, V, S>where K: IntoAtom<'js>, V: IntoJs<'js>,

Convert from Rust hash map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for bool

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for BTreeSet<T>where T: IntoJs<'js>,

Convert from Rust btree set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &LinkedList<T>where for<'a> &'a T: IntoJs<'js>,

Convert from Rust linked list to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for usize

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &Mutex<T>where for<'r> &'r T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &f32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V> IntoJs<'js> for BTreeMap<K, V>where K: IntoAtom<'js>, V: IntoJs<'js>,

Convert from Rust btree map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for RefCell<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &u64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for i16

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &i64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &StdString

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for ()

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for u16

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for StdString

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &str

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &Vec<T>where for<'a> &'a T: IntoJs<'js>,

Convert from Rust vector to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for u64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V, S> IntoJs<'js> for &IndexMap<K, V, S>where for<'a> &'a K: IntoAtom<'js>, for<'a> &'a V: IntoJs<'js>,

Available on crate feature indexmap only.

Convert from Rust index map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I> IntoJs<'js> for (A, B, C, D, E, F, G, H, I)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>, L: IntoJs<'js>, M: IntoJs<'js>, N: IntoJs<'js>, O: IntoJs<'js>, P: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for Vec<T>where T: IntoJs<'js>,

Convert from Rust vector to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, S> IntoJs<'js> for &HashSet<T, S>where for<'a> &'a T: IntoJs<'js>,

Convert from Rust hash set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &i32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for RwLock<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for SystemTime

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &RefCell<T>where for<'r> &'r T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for i8

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for Option<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &RwLock<T>where for<'r> &'r T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for i64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &u8

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V, S> IntoJs<'js> for IndexMap<K, V, S>where K: IntoAtom<'js>, V: IntoJs<'js>,

Available on crate feature indexmap only.

Convert from Rust index map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, L, R> IntoJs<'js> for Either<L, R>where L: IntoJs<'js>, R: IntoJs<'js>,

Available on crate feature either only.

Convert the either into JS

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, K, V, S> IntoJs<'js> for &HashMap<K, V, S>where for<'a> &'a K: IntoAtom<'js>, for<'a> &'a V: IntoJs<'js>,

Convert from Rust hash map to JS object

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A> IntoJs<'js> for (A,)where A: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &Box<T>where for<'r> &'r T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, E> IntoJs<'js> for &StdResult<T, E>where for<'a> &'a T: IntoJs<'js>, for<'a> Error: From<&'a E>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for f64

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T, S> IntoJs<'js> for &IndexSet<T, S>where for<'a> &'a T: IntoJs<'js>,

Available on crate feature indexmap only.

Convert from Rust index set to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &bool

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for LinkedList<T>where T: IntoJs<'js>,

Convert from Rust linked list to JS array

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &Cell<T>where T: IntoJs<'js> + Copy,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for &Option<T>where for<'a> &'a T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &i16

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &i8

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for isize

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for i32

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for Mutex<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, A, B, C, D, E, F, G, H, I, J, K, L> IntoJs<'js> for (A, B, C, D, E, F, G, H, I, J, K, L)where A: IntoJs<'js>, B: IntoJs<'js>, C: IntoJs<'js>, D: IntoJs<'js>, E: IntoJs<'js>, F: IntoJs<'js>, G: IntoJs<'js>, H: IntoJs<'js>, I: IntoJs<'js>, J: IntoJs<'js>, K: IntoJs<'js>, L: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js, T> IntoJs<'js> for Box<T>where T: IntoJs<'js>,

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

source§

impl<'js> IntoJs<'js> for &()

source§

fn into_js(self, ctx: Ctx<'js>) -> Result<Value<'js>>

Implementors§

source§

impl<'js> IntoJs<'js> for &Value<'js>

source§

impl<'js> IntoJs<'js> for Function<'js>

source§

impl<'js> IntoJs<'js> for Object<'js>

source§

impl<'js> IntoJs<'js> for Array<'js>

source§

impl<'js> IntoJs<'js> for ArrayBuffer<'js>

source§

impl<'js> IntoJs<'js> for BigInt<'js>

source§

impl<'js> IntoJs<'js> for Exception<'js>

source§

impl<'js> IntoJs<'js> for Null

source§

impl<'js> IntoJs<'js> for String<'js>

source§

impl<'js> IntoJs<'js> for Symbol<'js>

source§

impl<'js> IntoJs<'js> for Undefined

source§

impl<'js> IntoJs<'js> for Value<'js>

source§

impl<'js, 't, T> IntoJs<'js> for Persistent<T>where T: Outlive<'t>,

source§

impl<'js, C> IntoJs<'js> for Class<'js, C>where C: ClassDef,

Available on crate feature classes only.
source§

impl<'js, C> IntoJs<'js> for WithProto<'js, C>where C: ClassDef + IntoJs<'js>,

Available on crate feature classes only.
source§

impl<'js, F, A, R> IntoJs<'js> for Func<(F, PhantomData<(A, R)>)>where F: AsFunction<'js, A, R> + 'js,

source§

impl<'js, N, F, A, R> IntoJs<'js> for Func<(N, F, PhantomData<(A, R)>)>where N: AsRef<str>, F: AsFunction<'js, A, R> + 'js,

source§

impl<'js, T> IntoJs<'js> for TypedArray<'js, T>

source§

impl<'js, T, R> IntoJs<'js> for Promised<T>where T: Future<Output = Result<R>> + 'js, R: IntoJs<'js> + 'js,

Available on crate feature futures only.