Trait rquickjs::function::IntoArgs

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

    // Provided methods
    fn apply<R>(self, function: &Function<'js>) -> Result<R, Error>
       where R: FromJs<'js>,
             Self: Sized { ... }
    fn defer<R>(self, function: Function<'js>) -> Result<(), Error>
       where Self: Sized { ... }
    fn construct<R>(self, function: &Constructor<'js>) -> Result<(), Error>
       where Self: Sized { ... }
}
Expand description

A trait for converting a tuple of values into a list arguments.

Required Methods§

source

fn num_args(&self) -> usize

The number of arguments this value produces.

source

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

Convert the value into an argument.

Provided Methods§

source

fn apply<R>(self, function: &Function<'js>) -> Result<R, Error>
where R: FromJs<'js>, Self: Sized,

source

fn defer<R>(self, function: Function<'js>) -> Result<(), Error>
where Self: Sized,

source

fn construct<R>(self, function: &Constructor<'js>) -> Result<(), Error>
where Self: Sized,

Implementations on Foreign Types§

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

source§

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

source§

fn num_args(&self) -> usize

source§

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

Implementors§