Revise package terminology.

This commit is contained in:
Stephen Chung
2020-12-23 19:11:41 +08:00
parent 08e7ad8c09
commit 7d58324ad4
10 changed files with 129 additions and 95 deletions

View File

@@ -116,7 +116,7 @@ let mut engine = Engine::new();
// Load the module as the module namespace "MyEnum"
engine
.register_type_with_name::<MyEnum>("MyEnum")
.register_static_module("MyEnum", exported_module!(MyEnumModule));
.register_static_module("MyEnum", exported_module!(MyEnumModule).into());
```
With this API in place, working with enums feels almost the same as in Rust:

View File

@@ -146,7 +146,7 @@ pub mod bunny_api {
}
}
engine.register_global_module(exported_module!(bunny_api));
engine.register_global_module(exported_module!(bunny_api).into());
```
### Push Constant Command Object into Custom Scope