pub struct ConstructorMeta<T> {
    pub constructor: fn(_: &mut ExecuteData) -> ConstructorResult<T>,
    pub build_fn: fn(_: FunctionBuilder<'_>) -> FunctionBuilder<'_>,
}
Expand description

Stores metadata about a classes Rust constructor, including the function pointer and the arguments of the function.

Fields§

§constructor: fn(_: &mut ExecuteData) -> ConstructorResult<T>

Constructor function.

§build_fn: fn(_: FunctionBuilder<'_>) -> FunctionBuilder<'_>

Function called to build the constructor function. Usually adds arguments.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.