Skip to main content

ClassConstructor

Trait ClassConstructor 

Source
pub trait ClassConstructor:
    Send
    + Sync
    + 'static {
    // Required method
    fn construct(&self, cx: &mut Cx, args: Args) -> Result<Value>;
}
Expand description

Construction behavior supplied by the language or library declaring a class.

Required Methods§

Source

fn construct(&self, cx: &mut Cx, args: Args) -> Result<Value>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> ClassConstructor for F
where F: Fn(&mut Cx, Args) -> Result<Value> + Send + Sync + 'static,