diff options
| -rw-r--r-- | docs/transient-0.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/transient-0.md b/docs/transient-0.md index 90a6c40..67632d6 100644 --- a/docs/transient-0.md +++ b/docs/transient-0.md @@ -35,6 +35,16 @@ This describes the current encoding of transient-0. * `List[T]`: the number of elements in the list encoded as per `Int64`, followed by each of the elements in the list encoded as per `T`. +* `Shared[T]`: the first time a value is encountered, encoded as a unique ID as + per `Int64` followed by the encoding of the value itself as per `T`. + + Any subsequent times that value is encountered, encoded as the unique ID as + per `Int64`. + + Shared values should be assigned incremental IDs starting at zero. That is, + the first shared value should have an ID of 0, the second shared value should + have an ID of 1, and so on. + * A struct is encoded by encoding each of its fields in definition order. * An enum is encoded by the index of the variant as per `Int32`. |
