[ffx][fho] Add writer infrastructure

This adds a Writer associated type to FfxMain and uses it as an
additional argument to the main() function. Originally we intended this
to be something that would be included in the FfxTool struct, but with
the goal of minimizing complicated macro machinery it seemed better to
move it out to its own thing.

A new trait is introduced, `FfxToolIo`, that currently only mimics the
`ffx_plugin` functions around machine output, and defaults them to
saying no machine output. A followup change will add a concrete type to
the ffx_writer crate that requires a concrete machine type and will impl
this trait with 'better' definitions for those things.

Bug: 114369
Change-Id: Idfc90cab08570e1c2c86ea0381ebaa126c6d238d
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/774662
Commit-Queue: Megan Batty <mgnb@google.com>
Reviewed-by: Andrew Davies <awdavies@google.com>
9 files changed
tree: 00a540252695ad843a6cb33507d4d81d9d7c69d1
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. products/
  7. scripts/
  8. sdk/
  9. src/
  10. third_party/
  11. tools/
  12. zircon/
  13. .clang-format
  14. .clang-tidy
  15. .editorconfig
  16. .git-blame-ignore-revs
  17. .gitattributes
  18. .gitignore
  19. .gitmodules
  20. .gn
  21. .style.yapf
  22. analysis_options.yaml
  23. AUTHORS
  24. BUILD.gn
  25. CODE_OF_CONDUCT.md
  26. CONTRIBUTING.md
  27. fuchsia.code-workspace
  28. LICENSE
  29. OWNERS
  30. PATENTS
  31. pyrightconfig.json
  32. README.md
  33. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.