Skip to content

Further static safeguard against creating instances of types with no_constructor in Rust #629

Open
@ghost

Description

@Bromeon mentioned on Discord that it can be nice to introduce a DefaultConstructible trait for NativeClasses that don't have no_constructor, and use it as a bound for Instance::new and similar functions. Although this doesn't prevent the engine from trying to call the constructor anyway, it might be a nice-to-have on the Rust side.

This is a breaking change, and should be considered for the next minor version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeIssues and PRs that are breaking to fix/merge.c: exportComponent: export (mod export, derive)featureAdds functionality to the library

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions