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

Clean up naming #516

Merged
merged 5 commits into from
May 12, 2023
Merged

Clean up naming #516

merged 5 commits into from
May 12, 2023

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented May 12, 2023

The following trait changes have been done, because I worked out a way to use a single trait independent of if the function is async or not. This is done by using marker trait implementation, the marker trait implements FunctionKind which allows for some introspection on the kind of function it is (only FunctionKind::is_async() for now).

  • AsyncFunction (replaced by Function<A, K> where K: FunctionKind.
  • InstFn and AsyncInstFn (replaced by InstanceFunction<A, K> where K: FunctionKind.

The following renames and deprecations have happened:

  • Module::inst_fn and Module::async_inst_fn deprecated and replaced by Module::associated_function.
  • Module::async_fn deprecated and replaced by Module::function.
  • Module::field_fn deprecated and replaced by Module::field_function.
  • Module::index_fn deprecated and replaced by Module::index_function.
  • Function::function and Function::async_function deprecated and replaced by Function::new.

@udoprog udoprog added the enhancement New feature or request label May 12, 2023
@udoprog udoprog merged commit 921051a into main May 12, 2023
@udoprog udoprog deleted the clean-up-naming branch May 12, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant