Skip to main content

FromParams

Trait FromParams 

Source
pub trait FromParams<V>: Sized
where V: JSValueImpl,
{ // Required methods fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<Self, RongJSError>; fn param_requirements() -> ParamRequirement; }
Expand description

Represents parameter requirements for a function

  • required_count: number of mandatory parameters
  • exhaustive: if true, no extra parameters are allowed beyond the required ones

Required Methods§

Source

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<Self, RongJSError>

Source

fn param_requirements() -> ParamRequirement

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.

Implementations on Foreign Types§

Source§

impl<V> FromParams<V> for ()
where V: JSValueImpl,

Source§

fn from_params(accessor: &mut ParamsAccessor<'_, V>) -> Result<(), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A> FromParams<V> for (A,)
where V: JSValueImpl, A: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A,), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B> FromParams<V> for (A, B)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A, B), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B, C> FromParams<V> for (A, B, C)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A, B, C), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B, C, D> FromParams<V> for (A, B, C, D)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>, D: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A, B, C, D), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B, C, D, E> FromParams<V> for (A, B, C, D, E)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>, D: GetParam<V>, E: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A, B, C, D, E), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B, C, D, E, F> FromParams<V> for (A, B, C, D, E, F)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>, D: GetParam<V>, E: GetParam<V>, F: GetParam<V>,

Source§

fn from_params( accessor: &mut ParamsAccessor<'_, V>, ) -> Result<(A, B, C, D, E, F), RongJSError>

Source§

fn param_requirements() -> ParamRequirement

Source§

impl<V, A, B, C, D, E, F, G> FromParams<V> for (A, B, C, D, E, F, G)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>, D: GetParam<V>, E: GetParam<V>, F: GetParam<V>, G: GetParam<V>,

Source§

impl<V, A, B, C, D, E, F, G, H> FromParams<V> for (A, B, C, D, E, F, G, H)
where V: JSValueImpl, A: GetParam<V>, B: GetParam<V>, C: GetParam<V>, D: GetParam<V>, E: GetParam<V>, F: GetParam<V>, G: GetParam<V>, H: GetParam<V>,

Implementors§