Trait IntoArg

Source
pub trait IntoArg<'js> {
    // Required methods
    fn num_args(&self) -> usize;
    fn into_arg(self, args: &mut Args<'js>) -> Result<()>;
}
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<()>

Convert the value into an argument.

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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