Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate TypeBuilder in favor of implementing the Named trait #56

Merged
merged 2 commits into from
Sep 12, 2020

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Sep 12, 2020

Heads up to anyone who's writing modules.

So given this:

#[derive(Any)]
struct Foo {
}

This:

module.ty(&["Foo"]).build::<Foo>()?;

Is now this instead:

#[derive(Any)]
struct Foo {
}

module.ty::<Foo>()?;

Also adds the #[rune(name = "..")] attribute which allows for overriding the name:

#[derive(Any)]
#[rune(name = "Bar")]
struct Foo {
}

module.ty::<Foo>()?; // will register "Bar".

@udoprog udoprog merged commit 676a55b into master Sep 12, 2020
@udoprog udoprog deleted the named-trait branch September 12, 2020 20:07
@udoprog udoprog added enhancement New feature or request changelog Issue has been added to the changelog labels Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issue has been added to the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant