pub trait FromValues: Sized {
// Required method
fn from_values(values: Values, mv8: &MiniV8) -> Result<Self>;
}
Expand description
Trait for types that can be created from an arbitrary number of JavaScript values.
This is a generalization of FromValue
, allowing an arbitrary number of JavaScript values to
participate in the conversion. Any type that implements FromValue
will automatically implement
this trait.
Required Methods§
Sourcefn from_values(values: Values, mv8: &MiniV8) -> Result<Self>
fn from_values(values: Values, mv8: &MiniV8) -> Result<Self>
Performs the conversion.
In case values
contains more values than needed to perform the conversion, the excess
values should be ignored. Similarly, if not enough values are given, conversions should
assume that any missing values are undefined.
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.