Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/book/src/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ and API docs for the macros `define_property!`, `impl_property!`,
| Concept | Old System | New System | Notes / Implications |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **Property Type Structure** | Two separate types: (1) value type, and (2) property-identifier ZST. | A single type represents both the value and identifies the property. | Simplified to a single type |
| **Defining Properties** | Define a normal Rust type (or use an existing primitive, e.g. `u8`), then use a macro to define the identifying property type. | Define a normal Rust type, them use `impl_property` to declare it a `Property<E>` for a particular `Entity` `E`. | |
| **Defining Properties** | Define a normal Rust type (or use an existing primitive, e.g. `u8`), then use a macro to define the identifying property type. | Define a normal Rust type, then use `impl_property` to declare it a `Property<E>` for a particular `Entity` `E`. | |
| **Entity Association** | Implicit—only one entity ("person") | Every property must explicitly specify the `Entity` it belongs to (e.g., `Person`); Entities are defined separately. | |
| **Default Values** | Provided in the macro creating the property-identifier type. | Same but with updated syntax; default values are per `Property<E>` implementation. | |
| **Using Existing Types** | A single _value_ type can be used in multiple properties—including primitive types like `u8` | Only one property per type (per `Entity`); primitive types must be wrapped in a newtype. | Both systems require that the existing type implement the required property traits. |
Expand Down
Loading