Trait rquickjs::prelude::IntoArg

source ·
pub trait IntoArg<'js> {
    // Required methods
    fn num_args(&self) -> usize;
    fn into_arg(self, args: &mut Args<'js>) -> Result<(), Error>;
}
Expand description

A trait for converting values into arguments.

Required Methods§

source

fn num_args(&self) -> usize

The number of arguments this value produces.

source

fn into_arg(self, args: &mut Args<'js>) -> Result<(), Error>

Convert the value into an argument.

Implementors§

source§

impl<'js, T> IntoArg<'js> for Flat<T>
where T: IntoArgs<'js>,

source§

impl<'js, T> IntoArg<'js> for Opt<T>
where T: IntoJs<'js>,

source§

impl<'js, T> IntoArg<'js> for Rest<T>
where T: IntoJs<'js>,

source§

impl<'js, T> IntoArg<'js> for This<T>
where T: IntoJs<'js>,

source§

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