Crate cm_types

Source
Expand description

A crate containing common Component Manager types used in Component Manifests (.cml files and binary .cm files). These types come with serde serialization and deserialization implementations that perform the required validation.

Macros§

  • Generate impl From for two trivial enums with identical values, allowing converting to/from each other. This is useful if you have a FIDL-generated enum and a hand-rolled one that contain the same values.

Structs§

  • Path that separates the dirname and basename as different variables (referencing type). Convenient for / path representations that split the dirname and basename, like Fuchsia component decl.
  • A BoundedName is a Name that can have a max length of N bytes.
  • NamespacePath is the same as Path but accepts "/" (which is also a valid namespace path).
  • A path type used throughout Component Framework, along with its variants NamespacePath and RelativePath. Examples of use:
  • Same as Path except the path does not begin with /.
  • Path that separates the dirname and basename as different variables (owned type). Convenient for path representations that split the dirname and basename, like Fuchsia component decl.
  • A component URL. The URL is validated, but represented as a string to avoid normalization and retain the original representation.
  • A URL scheme.

Enums§

Constants§

Traits§

  • Trait implemented by path types that provides an API to iterate over path segments.

Type Aliases§

  • A Name with a higher string capacity of MAX_LONG_NAME_LENGTH.
  • A name that can refer to a component, collection, or other entity in the Component Manifest. Its length is bounded to MAX_NAME_LENGTH.