Trait rquickjs_core::object::AsProperty
source · pub trait AsProperty<'js, P> {
// Required method
fn config(
self,
ctx: Ctx<'js>
) -> Result<(c_int, Value<'js>, Value<'js>, Value<'js>)>;
}
Available on crate feature
properties
only.Expand description
The property interface
Required Methods§
sourcefn config(
self,
ctx: Ctx<'js>
) -> Result<(c_int, Value<'js>, Value<'js>, Value<'js>)>
fn config( self, ctx: Ctx<'js> ) -> Result<(c_int, Value<'js>, Value<'js>, Value<'js>)>
Property configuration
Returns the tuple which includes the following:
- flags
- value or undefined when no value is here
- getter or undefined if the property hasn’t getter
- setter or undefined if the property hasn’t setter
Implementors§
impl<'js, G, GA, GR> AsProperty<'js, (GA, GR, (), ())> for Accessor<G, ()>where G: AsFunction<'js, GA, GR> + 'js,
A property with getter only
impl<'js, G, GA, GR, S, SA, SR> AsProperty<'js, (GA, GR, SA, SR)> for Accessor<G, S>where G: AsFunction<'js, GA, GR> + 'js, S: AsFunction<'js, SA, SR> + 'js,
A property with getter and setter
impl<'js, S, SA, SR> AsProperty<'js, ((), (), SA, SR)> for Accessor<(), S>where S: AsFunction<'js, SA, SR> + 'js,
A property with setter only