Commit 7a228f29 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Add mojo IDL documentation for RenamedFrom.

Change-Id: I3632284e3369266779f3443884238010d1139f20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453495
Auto-Submit: Erik Chen <erikchen@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#814504}
parent 226e91fc
...@@ -712,6 +712,24 @@ values and will need to deal with them gracefully. See ...@@ -712,6 +712,24 @@ values and will need to deal with them gracefully. See
[C++ Versioning Considerations](/mojo/public/cpp/bindings/README.md#Versioning-Considerations) [C++ Versioning Considerations](/mojo/public/cpp/bindings/README.md#Versioning-Considerations)
for details. for details.
### Renaming versioned structs
It's possible to rename versioned structs by using the `[RenamedFrom]` attribute.
RenamedFrom
``` cpp
module asdf.mojom;
// Old version:
[Stable]
struct OldStruct {
};
// New version:
[Stable, RenamedFrom="asdf.mojom.OldStruct"]
struct NewStruct {
};
```
## Grammar Reference ## Grammar Reference
Below is the (BNF-ish) context-free grammar of the Mojom language: Below is the (BNF-ish) context-free grammar of the Mojom language:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment