Trait FromParam

Source
pub trait FromParam<'js>: Sized {
    // Required methods
    fn param_requirement() -> ParamRequirement;
    fn from_param<'a>(
        params: &mut ParamsAccessor<'a, 'js>,
    ) -> Result<Self, Error>;
}
Expand description

A trait to extract argument values.

Required Methods§

Source

fn param_requirement() -> ParamRequirement

The parameters requirements this value requires.

Source

fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<Self, Error>

Convert from a parameter value.

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> FromParam<'js> for Exhaustive

Source§

impl<'js> FromParam<'js> for Ctx<'js>

Source§

impl<'js, T> FromParam<'js> for Flat<T>
where T: FromParams<'js>,

Source§

impl<'js, T> FromParam<'js> for FuncArg<T>
where T: FromJs<'js>,

Source§

impl<'js, T> FromParam<'js> for Opt<T>
where T: FromJs<'js>,

Source§

impl<'js, T> FromParam<'js> for Rest<T>
where T: FromJs<'js>,

Source§

impl<'js, T> FromParam<'js> for This<T>
where T: FromJs<'js>,

Source§

impl<'js, T> FromParam<'js> for T
where T: FromJs<'js>,