[roll] Roll fuchsia [fidl][codec] Introduce Payload wrapper for Struct

This change is a refactor, in preparation for
I6b2d691067350993a309f573cf3c4360b7810204. The purpose here is to change
the manner in which fidl_codec represents payloads internally, to
abstract away the fact that (as of this CL) they are merely Structs.
Thus, while previously requests/response were literal `Struct` objects,
and the parameters thereof were represented as `StructMember` instances,
those have now been replaced by `Payload` and `Parameter` respectively.

In total, this change introduces 4 new classes:

* `Payloadable` is a base class for "payloadable" type definitions
  (currently just structs, but as of the next change, tables and unions
  as well). Data and capabilities that will be common to all payloadable
  types are now stored on the base class. `Struct` is now a derived
  `final` derivation of `Payloadable`.
* `PayloadValue` is a base class for payloadable values in much the same
  way.
* `Parameter` is an abstract representation of a method parameter. For
  structs, this enumerates every argument (ie, the "flattened"
  representation), while for tables and unions this will just be a
  reference to the underlying type (ie, the "unflattened"
  representation).
* 'Payload' is a container for `Payloadable` reference. In much the same
  manner that say `UnionMember` stores both the description of the
  member as well as its `Type` definition, `Payload` does the same for
  the top-level description + `Type` describing the entire message.

With this change in place, adding support for union and table payloads
should be a simple case of extending `Union|Table` to inherit from
`Payloadable` and `UnionValue|TableValue` to inherit from
`PayloadableValue`.

Test: fx test fidl-codex-tests fidlcat
Original-Bug: 88343
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/615347
Original-Revision: fd4d5d0976fc62715affbf58c0359626df90612c
GitOrigin-RevId: 0e96ed982934de53547bcb8a1661591155f35baf
Change-Id: I2cdfb45a77b39c1a9c0d009c118498a0af892028
1 file changed
tree: 02da9ef31e899eed3fc7542e8601a11680b942dd
  1. infra/
  2. third_party/
  3. cts
  4. firmware
  5. flower
  6. jiri.lock
  7. minimal
  8. prebuilts
  9. README.md
  10. stem
  11. test_durations
  12. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.