Skip to content

Commit

Permalink
Update docs/adr/0009-uniffi-tagging.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Platte <[email protected]>
  • Loading branch information
bendk and jplatte authored Jan 29, 2024
1 parent 6d02cd1 commit 4b07693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/adr/0009-uniffi-tagging.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The code in `uniffi_macros::setup_scaffolding` generates a zero-sized `crate::Un
For example, when lowering a type we use `<#type as Lower<crate::UniffiTag>>::lower`.

The reason for this is the so-called "Orphan rule", which prevents generated code from implemented a remote trait on a remote type.
If the FFI traits did not have a generic parameter, then it would be impossible to generate an code that implements those traits for a type defined in another crate.
If the FFI traits did not have a generic parameter, then it would be impossible to generate code that implements those traits for a type defined in another crate.
See [ADR-0006 Wrapping types](./0006-wrapping-types.md) for more discussion.

For local types we have a choice: implement only for the local tag (`impl Lift<crate::UniffiTag> for MyType`) or implement it for all tags (`impl<UT> Lift<UT> for MyType)`).
Expand Down

0 comments on commit 4b07693

Please sign in to comment.